home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / gg / file-3.20-morp.lha / lib / magic
Text File  |  2004-07-26  |  107KB  |  3,094 lines

  1. # Magic file created Mon Jul 26 01:14:57 GMT 2004 by anonymous
  2. #! file
  3. # Magic data for file(1) command.
  4. # Machine-genererated from src/cmd/file/magdir/*; edit there only!
  5. # Format is described in magic(files), where:
  6. # files is 4 on V7 and BSD, 4 on SV, and ?? in the SVID.
  7.  
  8. #------------------------------------------------------------------------------
  9. # Localstuff:  file(1) magic for locally observed files
  10. #
  11. # $Id: Localstuff,v 1.3 1995/01/21 21:09:00 christos Exp $
  12. # Add any locally observed files here.  Remember:
  13. # text if readable, executable if runnable binary, data if unreadable.
  14.  
  15. #------------------------------------------------------------------------------
  16. # alliant:  file(1) magic for Alliant FX series a.out files
  17. #
  18. # If the FX series is the one that had a processor with a 68K-derived
  19. # instruction set, the "short" should probably become "beshort" and the
  20. # "long" should probably become "belong".
  21. # If it's the i860-based one, they should probably become either the
  22. # big-endian or little-endian versions, depending on the mode they ran
  23. # the 860 in....
  24. #
  25. 0    short        0420        0420 Alliant virtual executable
  26. >2    short        &0x0020        common library
  27. >16    long        >0        not stripped
  28. 0    short        0421        0421 Alliant compact executable
  29. >2    short        &0x0020        common library
  30. >16    long        >0        not stripped
  31. #------------------------------------------------------------------------------
  32. # alpha architecture description
  33. #
  34.  
  35. 0    leshort        0603        COFF format alpha
  36. >22    leshort&030000    !020000        executable
  37. >24    leshort        0410        pure
  38. >24    leshort        0413        paged
  39. >22    leshort&020000    !0        dynamically linked
  40. >16    lelong        !0        not stripped
  41. >16    lelong        0        stripped
  42. >22    leshort&030000    020000        shared library
  43. >24    leshort        0407        object
  44. >27    byte        x        - version %d
  45. >26    byte        x        .%d
  46. >28    byte        x        -%d
  47.  
  48. #------------------------------------------------------------------------------
  49. # amiga:  file(1) magic for Amiga file formats
  50. #
  51. 0    belong        0x000003f3    AmigaOS hunk format executable
  52.  
  53. #------------------------------------------------------------------------------
  54. # animation:  file(1) magic for animation/movie formats
  55. #
  56. # animation formats
  57. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  58. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  59.  
  60. # MPEG animation format
  61. 0    string        \000\000\001\263    MPEG file
  62.  
  63. # FLI animation format
  64. 4    leshort        0xAF11            FLI file
  65. >6    leshort        x            - %d frames,
  66. >8    leshort        x            width=%d pixels,
  67. >10    leshort        x            height=%d pixels,
  68. >12    leshort        x            depth=%d,
  69. >16    leshort        x            ticks/frame=%d
  70. # FLC animation format
  71. 4    leshort        0xAF12            FLC file
  72. >6    leshort        x            - %d frames
  73. >8    leshort        x            width=%d pixels,
  74. >10    leshort        x            height=%d pixels,
  75. >12    leshort        x            depth=%d,
  76. >16    leshort        x            ticks/frame=%d
  77.  
  78. # DL animation format
  79. # XXX - collision with most `mips' magic
  80. #
  81. # I couldn't find a real magic number for these, however, this
  82. # -appears- to work.  Note that it might catch other files, too, so be
  83. # careful!
  84. #
  85. # Note that title and author appear in the two 20-byte chunks
  86. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  87. # 255 (hex FF)!  The DL format is really bad.
  88. #
  89. #0    byte    1    DL version 1, medium format (160x100, 4 images/screen)
  90. #>42    byte    x    - %d screens,
  91. #>43    byte    x    %d commands
  92. #0    byte    2    DL version 2
  93. #>1    byte    1    - large format (320x200,1 image/screen),
  94. #>1    byte    2    - medium format (160x100,4 images/screen),
  95. #>1    byte    >2    - unknown format,
  96. #>42    byte    x    %d screens,
  97. #>43    byte    x    %d commands
  98. # Based on empirical evidence, DL version 3 have several nulls following the
  99. # \003.  Most of them start with non-null values at hex offset 0x34 or so.
  100. #0    string    \3\0\0\0\0\0\0\0\0\0\0\0    DL version 3
  101.  
  102. # SGI and Apple formats
  103. 0    string        MOVI        Silicon Graphics movie file
  104. 4    string        moov        Apple QuickTime movie file (moov)
  105. 4    string        mdat        Apple QuickTime movie file (mdat)
  106.  
  107. #------------------------------------------------------------------------------
  108. # apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
  109. #       workspaces)
  110. #
  111. 0    long        0100554        APL workspace (Ken's original?)
  112.  
  113. #------------------------------------------------------------------------------
  114. # apple:  file(1) magic for Apple II file formats
  115. #
  116. 0    string        FiLeStArTfIlEsTaRt    binscii (apple ][) text
  117. 0    string        \x0aGL            Binary II (apple ][) data
  118. 0    string        \x76\xff        Squeezed (apple ][) data
  119. 0    string        SIT!            StuffIt (macintosh) text
  120. 0    string        NuFile            NuFile archive (apple ][) data
  121. 0    string        N\xf5F\xe9l\xe5        NuFile archive (apple ][) data
  122.  
  123. # Other Apple formats.
  124. # CodeWarrior object file
  125. 0    string        MWOBPPC            Metrowerks CodeWarrior object
  126. # Apple PEF executable
  127. 0    string        Joy\!peffpwpc        PEF executable
  128.  
  129. #------------------------------------------------------------------------------
  130. # archive:  file(1) magic for archive formats (see also "msdos" for self-
  131. #           extracting compressed archives)
  132. #
  133. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  134. # pre-POSIX "tar" archives are handled in the C code.
  135.  
  136. # POSIX tar archives
  137. 257    string        ustar\0        POSIX tar archive
  138. 257    string        ustar\040\040\0    GNU tar archive
  139.  
  140. # cpio archives
  141. #
  142. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  143. # The idea is to indicate archives produced on machines with the same
  144. # byte order as the machine running "file" with "cpio archive", and
  145. # to indicate archives produced on machines with the opposite byte order
  146. # from the machine running "file" with "byte-swapped cpio archive".
  147. #
  148. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  149. # are defined as "short"s; I think all the new formats are
  150. # character-header formats and thus are strings, not numbers.
  151. 0    short        070707        cpio archive
  152. 0    short        0143561        byte-swapped cpio archive
  153. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  154. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  155. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  156.  
  157. # other archives
  158. 0    long        0177555        very old archive
  159. 0    short        0177555        very old PDP-11 archive
  160. 0    long        0177545        old archive
  161. 0    short        0177545        old PDP-11 archive
  162. 0    long        0100554        apl workspace
  163. 0    string        =<ar>        archive
  164.  
  165. # MIPS archive (needs to go first)
  166. #
  167. 0    string    !<arch>\n__________E    MIPS archive
  168. >20    string    U            with MIPS Ucode members
  169. >21    string    L            with MIPSEL members
  170. >21    string    B            with MIPSEB members
  171. >19    string    L            and an EL hash table
  172. >19    string    B            and an EB hash table
  173. >22    string    X            -- out of date
  174.  
  175. 0    string        !<arch>        archive
  176. >8    string        __.SYMDEF    random library
  177. 0    string        -h-        Software Tools format archive text
  178.  
  179. #
  180. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  181. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  182. #
  183. # 0    string        !<arch>        current ar archive
  184. # 0    long        0x213c6172    archive file
  185. #
  186. # and for SVR3.1 archives, we have:
  187. #
  188. # 0    string        \<ar>        System V Release 1 ar archive
  189. # 0    string        =<ar>        archive
  190. # 0    string        =<ar>        archive
  191. #
  192. # XXX - did Aegis really store shared libraries, breakpointed modules,
  193. # and absolute code program modules in the same format as new-style
  194. # "ar" archives?
  195. #
  196. 0    string        !<arch>        current ar archive
  197. >8    string        __.SYMDEF    random library
  198. >8    string        debian-split    part of multipart Debian package
  199. >8    string        debian-binary    Debian binary package
  200. >0    belong        =65538        - pre SR9.5
  201. >0    belong        =65539        - post SR9.5
  202. >0    beshort        2        - object archive
  203. >0    beshort        3        - shared library module
  204. >0    beshort        4        - debug break-pointed module
  205. >0    beshort        5        - absolute code program module
  206. 0    string        \<ar>        System V Release 1 ar archive
  207. 0    string        =<ar>        archive
  208. #
  209. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  210. # thingies, to help you recognize VAX files on big-endian machines;
  211. # with "leshort", "lelong", and "string", that's no longer necessary....
  212. #
  213. 0    belong        0x65ff0000    VAX 3.0 archive
  214. 0    belong        0x3c61723e    VAX 5.0 archive
  215. #
  216. 0    long        0x213c6172    archive file
  217. 0    lelong        0177555        very old VAX archive
  218. 0    leshort        0177555        very old PDP-11 archive
  219. #
  220. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  221. # be a random library (it said 0xff65 rather than 0177545).
  222. #
  223. 0    lelong        0177545        old VAX archive
  224. >8    string        __.SYMDEF    random library
  225. 0    leshort        0177545        old PDP-11 archive
  226. >8    string        __.SYMDEF    random library
  227. #
  228. 0    string        =<ar>        archive
  229. #
  230. # From "pdp":
  231. #
  232. 0    lelong        0x39bed        PDP-11 old archive
  233. 0    lelong        0x39bee        PDP-11 4.0 archive
  234. #
  235. 0    string        -h-        Software Tools format archive text
  236.  
  237. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  238. #
  239. # The first byte is the magic (0x1a), byte 2 is the compression type for
  240. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  241. # filename of the first file (null terminated).  Since some types collide
  242. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  243. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
  244. 0    lelong&0x8080ffff    0x0000081a    ARC archive data, dynamic LZW
  245. 0    lelong&0x8080ffff    0x0000091a    ARC archive data, squashed
  246. 0    lelong&0x8080ffff    0x0000021a    ARC archive data, uncompressed
  247. 0    lelong&0x8080ffff    0x0000031a    ARC archive data, packed
  248. 0    lelong&0x8080ffff    0x0000041a    ARC archive data, squeezed
  249. 0    lelong&0x8080ffff    0x0000061a    ARC archive data, crunched
  250.  
  251. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  252. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  253. # [GRR:  the original entries collide with ARC, above; replaced with combined
  254. #  version (not tested)]
  255. #0    byte        0x1a        RISC OS archive
  256. #>1    string        archive        (ArcFS format)
  257. 0    string        \032archive    RISC OS archive (ArcFS format)
  258.  
  259. # ARJ archiver (jason@jarthur.Claremont.EDU)
  260. 0    leshort        0xea60        ARJ archive data
  261. >5    byte        x        \b, v%d,
  262. >8    byte        &0x04        multi-volume,
  263. >8    byte        &0x10        slash-switched,
  264. >8    byte        &0x20        backup,
  265. >34    string        x        original name: %s,
  266. >7    byte        0        os: MS-DOS
  267. >7    byte        1        os: PRIMOS
  268. >7    byte        2        os: Unix
  269. >7    byte        3        os: Amiga
  270. >7    byte        4        os: Macintosh
  271. >7    byte        5        os: OS/2
  272. >7    byte        6        os: Apple ][ GS
  273. >7    byte        7        os: Atari ST
  274. >7    byte        8        os: NeXT
  275. >7    byte        9        os: VAX/VMS
  276. >3    byte        >0        %d]
  277.  
  278. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  279. # This is a really bad format. A file containing HAWAII will match this...
  280. #0    string        HA        HA archive data,
  281. #>2    leshort        =1        1 file,
  282. #>2    leshort        >1        %u files,
  283. #>4    byte&0x0f    =0        first is type CPY
  284. #>4    byte&0x0f    =1        first is type ASC
  285. #>4    byte&0x0f    =2        first is type HSC
  286. #>4    byte&0x0f    =0x0e        first is type DIR
  287. #>4    byte&0x0f    =0x0f        first is type SPECIAL
  288.  
  289. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  290. 0    string        HPAK        HPACK archive data
  291.  
  292. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  293. 0    string        \351,\001JAM\        JAM archive,
  294. >7    string        >\0            version %.4s
  295. >0x26    byte        =0x27            -
  296. >>0x2b    string          >\0            label %.11s,
  297. >>0x27    lelong        x            serial %08x,
  298. >>0x36    string        >\0            fstype %.8s
  299.  
  300. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  301. 2    string        -lh0-        LHarc 1.x archive data [lh0]
  302. 2    string        -lh1-        LHarc 1.x archive data [lh1]
  303. 2    string        -lz4-        LHarc 1.x archive data [lz4]
  304. 2    string        -lz5-        LHarc 1.x archive data [lz5]
  305. #    [never seen any but the last; -lh4- reported in comp.compression:]
  306. 2    string        -lzs-        LHa 2.x? archive data [lzs]
  307. 2    string        -lh -        LHa 2.x? archive data [lh ]
  308. 2    string        -lhd-        LHa 2.x? archive data [lhd]
  309. 2    string        -lh2-        LHa 2.x? archive data [lh2]
  310. 2    string        -lh3-        LHa 2.x? archive data [lh3]
  311. 2    string        -lh4-        LHa (2.x) archive data [lh4]
  312. 2    string        -lh5-        LHa (2.x) archive data [lh5]
  313. >20    byte        x        - header level %d
  314.  
  315. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  316. 0    string        Rar!        RAR archive data
  317.  
  318. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  319. 0    string        SQSH        squished archive data (Acorn RISCOS)
  320.  
  321. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  322. # I can't figure out the self-extracting form of these buggers...
  323. 0    string        UC2\x1a        UC2 archive data
  324.  
  325. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  326. 0    string        PK\003\004    Zip archive data
  327. >4    byte        0x09        \b, at least v0.9 to extract
  328. >4    byte        0x0a        \b, at least v1.0 to extract
  329. >4    byte        0x0b        \b, at least v1.1 to extract
  330. >4    byte        0x14        \b, at least v2.0 to extract
  331.  
  332. # Zoo archiver
  333. 20    lelong        0xfdc4a7dc    Zoo archive data
  334. >4    byte        >48        \b, v%c.
  335. >>6    byte        >47        \b%c
  336. >>>7    byte        >47        \b%c
  337. >32    byte        >0        \b, modify: v%d
  338. >>33    byte        x        \b.%d+
  339. >42    lelong        0xfdc4a7dc    \b,
  340. >>70    byte        >0        extract: v%d
  341. >>>71    byte        x        \b.%d+
  342.  
  343. # Shell archives
  344. 10    string        #\ This\ is\ a\ shell\ archive    shell archive text
  345.  
  346. #------------------------------------------------------------------------------
  347. # att3b:  file(1) magic for AT&T 3B machines
  348. #
  349. # The `versions' should be un-commented if they work for you.
  350. # (Was the problem just one of endianness?)
  351. #
  352. # 3B20
  353. #
  354. 0    beshort        0550        3b20 COFF executable
  355. >12    belong        >0        not stripped
  356. #>22    beshort        >0        - version %ld
  357. 0    beshort        0551        3b20 COFF executable (TV)
  358. >12    belong        >0        not stripped
  359. #>22    beshort        >0        - version %ld
  360. #
  361. # WE32K
  362. #
  363. 0    beshort        0560        WE32000 COFF
  364. >18    beshort        ^00000020    object
  365. >18    beshort        &00000020    executable
  366. >12    belong        >0        not stripped
  367. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  368. >18    beshort        &00020000    32100 required
  369. >18    beshort        &00040000    and MAU hardware required
  370. >20    beshort        0407        (impure)
  371. >20    beshort        0410        (pure)
  372. >20    beshort        0413        (demand paged)
  373. >20    beshort        0443        (target shared library)
  374. >22    beshort        >0        - version %ld
  375. 0    beshort        0561        WE32000 COFF executable (TV)
  376. >12    belong        >0        not stripped
  377. #>18    beshort        &00020000    - 32100 required
  378. #>18    beshort        &00040000    and MAU hardware required
  379. #>22    beshort        >0        - version %ld
  380. #
  381. # core file for 3b2 
  382. 0    string        \000\004\036\212\200    3b2 core file
  383. >364    string        >\0        of '%s'
  384.  
  385. #------------------------------------------------------------------------------
  386. # audio:  file(1) magic for sound formats (see also "iff")
  387. #
  388. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  389. # and others
  390. #
  391.  
  392. # Sun/NeXT audio data
  393. 0    string        .snd        Sun/NeXT audio data:
  394. >12    belong        1        8-bit ISDN u-law,
  395. >12    belong        2        8-bit linear PCM [REF-PCM],
  396. >12    belong        3        16-bit linear PCM,
  397. >12    belong        4        24-bit linear PCM,
  398. >12    belong        5        32-bit linear PCM,
  399. >12    belong        6        32-bit IEEE floating point,
  400. >12    belong        7        64-bit IEEE floating point,
  401. >12    belong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  402. >20    belong        1        mono,
  403. >20    belong        2        stereo,
  404. >20    belong        4        quad,
  405. >16    belong        >0        %d Hz
  406.  
  407. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  408. # that uses little-endian encoding and has a different magic number
  409. 0    lelong        0x0064732E    DEC audio data:
  410. >12    lelong        1        8-bit ISDN u-law,
  411. >12    lelong        2        8-bit linear PCM [REF-PCM],
  412. >12    lelong        3        16-bit linear PCM,
  413. >12    lelong        4        24-bit linear PCM,
  414. >12    lelong        5        32-bit linear PCM,
  415. >12    lelong        6        32-bit IEEE floating point,
  416. >12    lelong        7        64-bit IEEE floating point,
  417. >12    lelong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  418. >20    lelong        1        mono,
  419. >20    lelong        2        stereo,
  420. >20    lelong        4        quad,
  421. >16    lelong        >0        %d Hz
  422.  
  423. # Creative Labs AUDIO stuff
  424. 0    string    MThd            Standard MIDI data
  425. >9     byte    >0            (format %d)
  426. >11    byte    >1            using %d channels
  427. 0    string    CTMF            Creative Music (CMF) data
  428. 0    string    SBI            SoundBlaster instrument data
  429. 0    string    Creative\ Voice\ File    Creative Labs voice data
  430. # is this next line right?  it came this way...
  431. >19    byte    0x1A
  432. >23    byte    >0            - version %d
  433. >22    byte    >0            \b.%d
  434.  
  435. # first entry is also the string "NTRK"
  436. 0    belong        0x4e54524b    MultiTrack sound data
  437. >4    belong        x        - version %ld
  438.  
  439. # Microsoft WAVE format (*.wav)
  440. # [GRR 950115:  probably all of the shorts and longs should be leshort/lelong]
  441. 0    string        RIFF        Microsoft RIFF
  442. >8    string        WAVE        \b, WAVE audio data
  443. >>34    short        >0        \b, %d bit
  444. >>22    short        =1        \b, mono
  445. >>22    short        =2        \b, stereo
  446. >>22    short        >2        \b, %d channels
  447. >>24    long        >0        %d Hz
  448. # AVI == Audio Video Interleave
  449. >8      string          AVI\            \b, AVI data
  450.  
  451. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  452. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  453. 0    string        EMOD        Extended MOD sound data,
  454. >4    byte&0xf0    x        version %d
  455. >4    byte&0x0f    x        \b.%d,
  456. >45    byte        x        %d instruments
  457. >83    byte        0        (module)
  458. >83    byte        1        (song)
  459.  
  460. # Real Audio (Magic .ra\0375)
  461. 0    belong        0x2e7261fd    realaudio sound file
  462.  
  463. # Real Audio (Magic .ra\0375)
  464. 0    belong        0x2e7261fd    realaudio sound file
  465.  
  466. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  467. # Oct 31, 1995
  468. 0    string        MTM        MultiTracker Module sound file
  469. 0    string        if        Composer 669 Module sound data
  470. 0    string        FAR        Module sound data
  471. 0    string        MAS_U        ULT(imate) Module sound data
  472. 0x2c    string        SCRM        ScreamTracker III Module sound data
  473. 0    string        Extended Module    Extended Module sound data
  474.  
  475. #------------------------------------------------------------------------------
  476. # blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
  477. #
  478. # Note that this 0407 conflicts with several other a.out formats...
  479. #
  480. # XXX - should this be redone with "be" and "le", so that it works on
  481. # little-endian machines as well?  If so, what's the deal with
  482. # "VAX-order" and "VAX-order2"?
  483. #
  484. #0    long        0407        68K Blit (standalone) executable
  485. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  486. 0    short        03401        VAX-order 68K Blit (standalone) executable
  487. 0    long        0406        68k Blit mpx/mux executable
  488. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  489. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  490. # Need more values for WE32 DMD executables.
  491. # Note that 0520 is the same as COFF
  492. #0    short        0520        tty630 layers executable
  493.  
  494. #------------------------------------------------------------------------------
  495. # c-lang:  file(1) magic for C programs (or REXX)
  496. #
  497.  
  498. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  499. # if you uncomment "/*" for C/REXX below, also uncomment this entry
  500. #0    string        /*\ XPM\ */    X pixmap image data
  501.  
  502. # this first will upset you if you're a PL/1 shop...
  503. # in which case rm it; ascmagic will catch real C programs
  504. #0    string        /*        C or REXX program text
  505. 0    string        //        C++ program text
  506.  
  507. #------------------------------------------------------------------------------
  508. # chi:  file(1) magic for ChiWriter files
  509. #
  510. 0       string          \\1cw\          ChiWriter file
  511. >5      string          >\0             version %s
  512. 0       string          \\1cw           ChiWriter file
  513.  
  514. #------------------------------------------------------------------------------
  515. # clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
  516. #
  517. # XXX - what byte order does the Clipper use?
  518. #
  519. # XXX - what's the "!" stuff:
  520. #
  521. # >18    short        !074000,000000    C1 R1 
  522. # >18    short        !074000,004000    C2 R1
  523. # >18    short        !074000,010000    C3 R1
  524. # >18    short        !074000,074000    TEST
  525. #
  526. # I shall assume it's ANDing the field with the first value and
  527. # comparing it with the second, and rewrite it as:
  528. #
  529. # >18    short&074000    000000        C1 R1 
  530. # >18    short&074000    004000        C2 R1
  531. # >18    short&074000    010000        C3 R1
  532. # >18    short&074000    074000        TEST
  533. #
  534. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  535. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  536. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  537. # somebody else thought was a good idea; it's not documented in the
  538. # man page for this version of "magic", nor does it appear to be
  539. # implemented (at least not after I blew off the bogus code to turn
  540. # old-style "&"s into new-style "&"s, which just didn't work at all).
  541. #
  542. 0    short        0575        CLIPPER COFF executable (VAX #)
  543. >20    short        0407        (impure)
  544. >20    short        0410        (5.2 compatible)
  545. >20    short        0411        (pure)
  546. >20    short        0413        (demand paged)
  547. >20    short        0443        (target shared library)
  548. >12    long        >0        not stripped
  549. >22    short        >0        - version %ld
  550. 0    short        0577        CLIPPER COFF executable
  551. >18    short&074000    000000        C1 R1 
  552. >18    short&074000    004000        C2 R1
  553. >18    short&074000    010000        C3 R1
  554. >18    short&074000    074000        TEST
  555. >20    short        0407        (impure)
  556. >20    short        0410        (pure)
  557. >20    short        0411        (separate I&D)
  558. >20    short        0413        (paged)
  559. >20    short        0443        (target shared library)
  560. >12    long        >0        not stripped
  561. >22    short        >0        - version %ld
  562. >48    long&01        01        alignment trap enabled
  563. >52    byte        1        -Ctnc
  564. >52    byte        2        -Ctsw
  565. >52    byte        3        -Ctpw
  566. >52    byte        4        -Ctcb
  567. >53    byte        1        -Cdnc
  568. >53    byte        2        -Cdsw
  569. >53    byte        3        -Cdpw
  570. >53    byte        4        -Cdcb
  571. >54    byte        1        -Csnc
  572. >54    byte        2        -Cssw
  573. >54    byte        3        -Cspw
  574. >54    byte        4        -Cscb
  575. 4    string        pipe        CLIPPER instruction trace
  576. 4    string        prof        CLIPPER instruction profile
  577.  
  578. #------------------------------------------------------------------------------
  579. # commands:  file(1) magic for various shells and interpreters
  580. #
  581. 0    string        :\ shell archive or commands for antique kernel text
  582. 0    string        #!/bin/sh        Bourne shell script text
  583. 0    string        #!\ /bin/sh        Bourne shell script text
  584. 0    string        #!/bin/csh        C shell script text
  585. 0    string        #!\ /bin/csh        C shell script text
  586. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  587. 0    string        #!/bin/ksh        Korn shell script text
  588. 0    string        #!\ /bin/ksh        Korn shell script text
  589. 0    string         #!/bin/tcsh        Tenex C shell script text
  590. 0    string         #!\ /bin/tcsh        Tenex C shell script text
  591. 0    string        #!/usr/local/tcsh    Tenex C shell script text
  592. 0    string         #!\ /usr/local/tcsh    Tenex C shell script text
  593. 0    string        #!/usr/local/bin/tcsh    Tenex C shell script text
  594. 0    string        #!\ /usr/local/bin/tcsh    Tenex C shell script text
  595. #
  596. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  597. 0    string        #!/usr/local/bin/zsh    Paul Falstad's zsh
  598. 0    string        #!\ /usr/local/bin/zsh    Paul Falstad's zsh
  599. 0    string        #!/usr/local/bin/ash    Neil Brown's ash
  600. 0    string        #!\ /usr/local/bin/ash    Neil Brown's ash
  601. 0    string        #!/usr/local/bin/ae    Neil Brown's ae
  602. 0    string        #!\ /usr/local/bin/ae    Neil Brown's ae
  603. 0    string        #!/bin/nawk        new awk script text
  604. 0    string        #!\ /bin/nawk        new awk script text
  605. 0    string        #!/usr/bin/nawk        new awk script text
  606. 0    string        #!\ /usr/bin/nawk    new awk script text
  607. 0    string        #!/usr/local/bin/nawk    new awk script text
  608. 0    string        #!\ /usr/local/bin/nawk    new awk script text
  609. 0    string        #!/bin/gawk        GNU awk script text
  610. 0    string        #!\ /bin/gawk        GNU awk script text
  611. 0    string        #!/usr/bin/gawk        GNU awk script text
  612. 0    string        #!\ /usr/bin/gawk    GNU awk script text
  613. 0    string        #!/usr/local/bin/gawk    GNU awk script text
  614. 0    string        #!\ /usr/local/bin/gawk    GNU awk script text
  615. #
  616. 0    string        #!/bin/awk        awk commands text
  617. 0    string        #!\ /bin/awk        awk commands text
  618. 0    string        #!/usr/bin/awk        awk commands text
  619. 0    string        #!\ /usr/bin/awk    awk commands text
  620. 0    string        BEGIN            awk commands text
  621.  
  622. # For Larry Wall's perl language.  The ``eval'' line recognizes an
  623. # outrageously clever hack for USG systems.
  624. #                Keith Waclena <keith@cerberus.uchicago.edu>
  625. 0    string        #!/bin/perl            perl commands text
  626. 0    string        #!\ /bin/perl            perl commands text
  627. 0    string        eval\ "exec\ /bin/perl        perl commands text
  628. 0    string        #!/usr/bin/perl            perl commands text
  629. 0    string        #!\ /usr/bin/perl        perl commands text
  630. 0    string        eval\ "exec\ /usr/bin/perl    perl commands text
  631. 0    string        #!/usr/local/bin/perl        perl commands text
  632. 0    string        #!\ /usr/local/bin/perl        perl commands text
  633. 0    string        eval\ "exec\ /usr/local/bin/perl    perl commands text
  634.  
  635. # AT&T Bell Labs' Plan 9 shell
  636. 0    string        #!/bin/rc    Plan 9 rc shell script text
  637. 0    string        #!\ /bin/rc    Plan 9 rc shell script text
  638.  
  639. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  640. 0    string        #!/bin/bash    Bourne-Again shell script text
  641. 0    string        #!\ /bin/bash    Bourne-Again shell script text
  642. 0    string        #!/usr/local/bin/bash    Bourne-Again shell script text
  643. 0    string        #!\ /usr/local/bin/bash    Bourne-Again shell script text
  644.  
  645. # generic shell magic
  646. 0    string        #!\ /            a
  647. >3    string        >\0            %s script text
  648. 0    string        #!/            a
  649. >2    string        >\0            %s script text
  650. 0    string        #!\             commands text
  651. >3    string        >\0            for %s
  652.  
  653. #------------------------------------------------------------------------------
  654. # compress:  file(1) magic for pure-compression formats (no archives)
  655. #
  656. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  657. #
  658. # Formats for various forms of compressed data
  659. # Formats for "compress" proper have been moved into "compress.c",
  660. # because it tries to uncompress it to figure out what's inside.
  661.  
  662. # standard unix compress
  663. 0    string        \037\235    compress'd data
  664. >2    byte&0x80    >0        block compressed
  665. >2    byte&0x1f    x        %d bits
  666.  
  667. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  668. 0       string          \037\213        gzip compressed data
  669. >2      byte            <8              \b, reserved method,
  670. >2      byte            8               \b, deflated,
  671. >3    byte        &0x01        ASCII,
  672. >3    byte        &0x02        continuation,
  673. >3    byte        &0x04        extra field,
  674. >3    byte        &0x08        original filename,
  675. >3    byte        &0x10        comment,
  676. >3    byte        &0x20        encrypted,
  677. >4    ledate        x        last modified: %s,
  678. >8    byte        2        max compression,
  679. >8    byte        4        max speed,
  680. >9    byte        =0x00        os: MS-DOS
  681. >9    byte        =0x01        os: Amiga
  682. >9    byte        =0x02        os: VMS
  683. >9    byte        =0x03        os: Unix
  684. >9    byte        =0x05        os: Atari
  685. >9    byte        =0x06        os: OS/2
  686. >9    byte        =0x07        os: MacOS
  687. >9    byte        =0x0A        os: Tops/20
  688. >9    byte        =0x0B        os: Win/32
  689.  
  690. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  691. 0    string        \037\036    packed data
  692. >2    belong        >1        \b, %d characters originally
  693. >2    belong        =1        \b, %d character originally
  694. #
  695. # This magic number is byte-order-independent.  XXX - Does that mean this
  696. # is big-endian, little-endian, either, or that you can't tell?
  697. # this short is valid for SunOS
  698. 0    short        017437        old packed data
  699.  
  700. # XXX - why *two* entries for "compacted data", one of which is
  701. # byte-order independent, and one of which is byte-order dependent?
  702. #
  703. 0    short        0x1fff        compacted data
  704. # This string is valid for SunOS (BE) and a matching "short" is listed
  705. # in the Ultrix (LE) magic file.
  706. 0    string        \377\037    compacted data
  707. 0    short        0145405        huf output
  708.  
  709. # Squeeze and Crunch...
  710. # These numbers were gleaned from the Unix versions of the programs to
  711. # handle these formats.  Note that I can only uncrunch, not crunch, and
  712. # I didn't have a crunched file handy, so the crunch number is untested.
  713. #                Keith Waclena <keith@cerberus.uchicago.edu>
  714. 0    leshort        0x76FF        squeezed data (CP/M, DOS)
  715. 0    leshort        0x76FE        crunched data (CP/M, DOS)
  716.  
  717. # Freeze
  718. 0    string        \037\237    frozen file 2.1
  719. 0    string        \037\236    frozen file 1.0 (or gzip 0.5)
  720.  
  721. # SCO compress -H (LZH)
  722. 0    string        \037\240    SCO compress -H (LZH) data
  723.  
  724. # European GSM 06.10 is a provisional standard for full-rate speech
  725. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  726. # excitation/long term prediction) coding at 13 kbit/s.
  727. #
  728. # There's only a magic nibble (4 bits); that nibble repeats every 33
  729. # bytes.  This isn't suited for use, but maybe we can use it someday.
  730. #
  731. # This will cause very short GSM files to be declared as data and
  732. # mismatches to be declared as data too!
  733. #0    byte&0xF0    0xd0    data
  734. #>33    byte&0xF0    0xd0
  735. #>66    byte&0xF0    0xd0
  736. #>99    byte&0xF0    0xd0
  737. #>132    byte&0xF0    0xd0    GSM 06.10 compressed audio
  738.  
  739. #------------------------------------------------------------------------------
  740. # convex:  file(1) magic for Convex boxes
  741. #
  742. # Convexes are big-endian.
  743. #
  744. 0    long        0513        Convex executable
  745.  
  746. #------------------------------------------------------------------------------
  747. # database:  file(1) magic for various databases
  748. #
  749. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  750. #
  751. #
  752. # GDBM magic numbers
  753. #  Will be maintained as part of the GDBM distribution in the future.
  754. #  <downsj@teeny.org>
  755. 0    belong    0x13579ace    GNU dbm 1.x or ndbm database, big endian
  756. 0    lelong    0x13579ace    GNU dbm 1.x or ndbm database, little endian
  757. 0    string    GDBM        GNU dbm 2.x database
  758. #
  759. 0    belong    0x061561    Berkeley DB Hash file
  760. >4    belong    >0        (Version %d,
  761. >8    belong    1234        Little Endian,
  762. >8    belong    4321        Big Endian,
  763. >12    belong    x        Bucket Size %d,
  764. >16    belong    x        Directory Size %d,
  765. >20    belong    x        Segment Size %d,
  766. >24    belong    x        Segment Shift %d,
  767. >28    belong    x        Overflow Point %d,
  768. >32    belong    x        Last Freed %d,
  769. >36    belong    x        Max Bucket %d,
  770. >40    belong    x        High Mask 0x%x,
  771. >44    belong    x        Low Mask 0x%x,
  772. >48    belong    x        Fill Factor %d,
  773. >52    belong    x        Number of Keys %d)
  774. #
  775. 0    belong    0x053162    Berkeley DB Btree file
  776. >4    belong    >0        (Version %d,
  777. >8    belong    x        Page Size %d,
  778. >12    belong    x        Free Page %d,
  779. >16    belong    x        Number of Records %d,
  780. >20    belong    x        Flags 0x%x)
  781.  
  782. #------------------------------------------------------------------------------
  783. # diamond:  file(1) magic for Diamond system
  784. #
  785. # ... diamond is a multi-media mail and electronic conferencing system....
  786. #
  787. # XXX - I think it was either renamed Slate, or replaced by Slate....
  788. #
  789. #    The full deal is too long...
  790. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  791. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  792.  
  793. #------------------------------------------------------------------------------
  794. # diff:  file(1) magic for diff(1) output
  795. #
  796. 0    string        diff\     'diff' output text
  797. 0    string        ***\         'diff' output text
  798. 0    string        Only\ in\     'diff' output text
  799. 0    string        Common\ subdirectories:\     'diff' output text
  800.  
  801. #------------------------------------------------------------------------------
  802. # dump:  file(1) magic for dump file format--for new and old dump filesystems
  803. #
  804. # We specify both byte orders in order to recognize byte-swapped dumps.
  805. #
  806. 24    belong    60012        new-fs dump file (big endian),
  807. >4    bedate    x        Previous dump %s,
  808. >8    bedate    x        This dump %s,
  809. >12    belong    >0        Volume %ld,
  810. >692    belong    0        Level zero, type:
  811. >692    belong    >0        Level %d, type:
  812. >0    belong    1        tape header,
  813. >0    belong    2        beginning of file record,
  814. >0    belong    3        map of inodes on tape,
  815. >0    belong    4        continuation of file record,
  816. >0    belong    5        end of volume,
  817. >0    belong    6        map of inodes deleted,
  818. >0    belong    7        end of medium (for floppy),
  819. >676    string    >\0        Label %s,
  820. >696    string    >\0        Filesystem %s,
  821. >760    string    >\0        Device %s,
  822. >824    string    >\0        Host %s,
  823. >888    belong    >0        Flags %x
  824.  
  825. 24    belong    60011        old-fs dump file (big endian),
  826. #>4    bedate    x        Previous dump %s,
  827. #>8    bedate    x        This dump %s,
  828. >12    belong    >0        Volume %ld,
  829. >692    belong    0        Level zero, type:
  830. >692    belong    >0        Level %d, type:
  831. >0    belong    1        tape header,
  832. >0    belong    2        beginning of file record,
  833. >0    belong    3        map of inodes on tape,
  834. >0    belong    4        continuation of file record,
  835. >0    belong    5        end of volume,
  836. >0    belong    6        map of inodes deleted,
  837. >0    belong    7        end of medium (for floppy),
  838. >676    string    >\0        Label %s,
  839. >696    string    >\0        Filesystem %s,
  840. >760    string    >\0        Device %s,
  841. >824    string    >\0        Host %s,
  842. >888    belong    >0        Flags %x
  843.  
  844. 24    lelong    60012        new-fs dump file (little endian),
  845. >4    ledate    x        Previous dump %s,
  846. >8    ledate    x        This dump %s,
  847. >12    lelong    >0        Volume %ld,
  848. >692    lelong    0        Level zero, type:
  849. >692    lelong    >0        Level %d, type:
  850. >0    lelong    1        tape header,
  851. >0    lelong    2        beginning of file record,
  852. >0    lelong    3        map of inodes on tape,
  853. >0    lelong    4        continuation of file record,
  854. >0    lelong    5        end of volume,
  855. >0    lelong    6        map of inodes deleted,
  856. >0    lelong    7        end of medium (for floppy),
  857. >676    string    >\0        Label %s,
  858. >696    string    >\0        Filesystem %s,
  859. >760    string    >\0        Device %s,
  860. >824    string    >\0        Host %s,
  861. >888    lelong    >0        Flags %x
  862.  
  863. 24    lelong    60011        old-fs dump file (little endian),
  864. #>4    ledate    x        Previous dump %s,
  865. #>8    ledate    x        This dump %s,
  866. >12    lelong    >0        Volume %ld,
  867. >692    lelong    0        Level zero, type:
  868. >692    lelong    >0        Level %d, type:
  869. >0    lelong    1        tape header,
  870. >0    lelong    2        beginning of file record,
  871. >0    lelong    3        map of inodes on tape,
  872. >0    lelong    4        continuation of file record,
  873. >0    lelong    5        end of volume,
  874. >0    lelong    6        map of inodes deleted,
  875. >0    lelong    7        end of medium (for floppy),
  876. >676    string    >\0        Label %s,
  877. >696    string    >\0        Filesystem %s,
  878. >760    string    >\0        Device %s,
  879. >824    string    >\0        Host %s,
  880. >888    lelong    >0        Flags %x
  881.  
  882. #------------------------------------------------------------------------------
  883. # elf:  file(1) magic for ELF executables
  884. #
  885. # We have to check the byte order flag to see what byte order all the
  886. # other stuff in the header is in.
  887. #
  888. # Byte order is probably big-endian for MIPS RS3000 and Amdahl.
  889. # MIPS RS3000 may also be for MIPS RS2000.
  890. #
  891. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  892. 0    string        \177ELF        ELF
  893. >4    byte        0        invalid class
  894. >4    byte        1        32-bit
  895. >4    byte        2        64-bit
  896. >5    byte        0        invalid byte order
  897. >5    byte        1        LSB
  898. >>16    leshort        0        no file type,
  899. >>16    leshort        1        relocatable,
  900. >>16    leshort        2        executable,
  901. >>16    leshort        3        shared object,
  902. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  903. >>16    leshort        4        core file
  904. >>>576  string          >\0             of '%s'
  905. >>>400  lelong          >0              (signal %d),
  906. >>16    leshort        &0xff00        processor-specific,
  907. >>18    leshort        0        no machine,
  908. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  909. >>18    leshort        2        SPARC - invalid byte order,
  910. >>18    leshort        3        Intel 80386,
  911. >>18    leshort        4        Motorola 68000 - invalid byte order,
  912. >>18    leshort        5        Motorola 88000 - invalid byte order,
  913. >>18    leshort        6        Intel 80486,
  914. >>18    leshort        7        Intel 80860,
  915. >>18    leshort        8        MIPS RS3000,
  916. >>18    leshort        9        Amdahl,
  917. >>20    lelong        0        invalid version
  918. >>20    lelong        1        version 1
  919. >>36    lelong        1        MathCoPro/FPU/MAU Required
  920. >5    byte        2        MSB
  921. >>16    beshort        0        no file type,
  922. >>16    beshort        1        relocatable,
  923. >>16    beshort        2        executable,
  924. >>16    beshort        3        shared object,
  925. >>16    beshort        4        core file,
  926. >>>576    string        >\0        of '%s'
  927. >>>400    lelong        >0        (signal %d),
  928. >>16    beshort        &0xff00        processor-specific,
  929. >>18    beshort        0        no machine,
  930. >>18    beshort        1        AT&T WE32100,
  931. >>18    beshort        2        SPARC,
  932. >>18    beshort        3        Intel 80386 - invalid byte order,
  933. >>18    beshort        4        Motorola 68000,
  934. >>18    beshort        5        Motorola 88000,
  935. >>18    beshort        6        Intel 80486 - invalid byte order,
  936. >>18    beshort        7        Intel 80860,
  937. >>18    beshort        8        MIPS RS3000,
  938. >>18    leshort        9        Amdahl,
  939. >>20    belong        0        invalid version
  940. >>20    belong        1        version 1
  941. >>36    belong        1        MathCoPro/FPU/MAU Required
  942.  
  943. #------------------------------------------------------------------------------
  944. # encore:  file(1) magic for Encore machines
  945. #
  946. # XXX - needs to have the byte order specified (NS32K was little-endian,
  947. # dunno whether they run the 88K in little-endian mode or not).
  948. #
  949. 0    short        0x154        Encore
  950. >20    short        0x107        executable
  951. >20    short        0x108        pure executable
  952. >20    short        0x10b        demand-paged executable
  953. >20    short        0x10f        unsupported executable
  954. >12    long        >0        not stripped
  955. >22    short        >0        - version %ld
  956. >22    short        0        -
  957. #>4    date        x        stamp %s
  958. 0    short        0x155        Encore unsupported executable
  959. >12    long        >0        not stripped
  960. >22    short        >0        - version %ld
  961. >22    short        0        -
  962. #>4    date        x        stamp %s
  963.  
  964. #------------------------------------------------------------------------------
  965. # filesystems:  file(1) magic for different filesystems
  966. #
  967. 0x438    leshort    0xEF53            Linux/i386 ext2 filesystem
  968. 0    string    \366\366\366\366    PC formatted floppy with no filesystem
  969.  
  970. #------------------------------------------------------------------------------
  971. # fonts:  file(1) magic for font data
  972. #
  973. 0    string        FONT        ASCII vfont text
  974. 0    short        0436        Berkeley vfont data
  975. 0    short        017001        byte-swapped Berkeley vfont data
  976.  
  977. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  978. 0    string        %!PS-AdobeFont-1.0    PostScript Type 1 font text
  979. >20    string        >\0            (%s)
  980. 6    string        %!PS-AdobeFont-1.0    PostScript Type 1 font program data
  981.  
  982. # X11 font files in SNF (Server Natural Format) format
  983. 0    belong        00000004        X11 SNF font data, MSB first
  984. 0    lelong        00000004        X11 SNF font data, LSB first
  985.  
  986. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  987. 0    string        STARTFONT\040        X11 BDF font text
  988.  
  989. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  990. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  991. 0    string        \001fcp            X11 Portable Compiled Font data
  992. >12    byte        0x02            \b, LSB first
  993. >12    byte        0x0a            \b, MSB first
  994. 0    string        D1.0\015        X11 Speedo font data
  995.  
  996. #------------------------------------------------------------------------------
  997. # frame:  file(1) magic for FrameMaker files
  998. #
  999. # This stuff came on a FrameMaker demo tape, most of which is
  1000. # copyright, but this file is "published" as witness the following:
  1001. #
  1002. 0    string        \<MakerFile    FrameMaker document
  1003. >11    string        4.0         (4.0
  1004. >11    string        3.0         (3.0
  1005. >11    string        2.0         (2.0
  1006. >11    string        1.0         (1.0
  1007. >14    byte        x          %c)
  1008. 0    string        \<MIFFile    FrameMaker MIF (ASCII) file
  1009. >9    string        4.0         (4.0)
  1010. >9    string        3.0         (3.0)
  1011. >9    string        2.0         (2.0)
  1012. >9    string        1.0         (1.x)
  1013. 0    string        \<MakerDictionary    FrameMaker Dictionary text
  1014. >17    string        3.0         (3.0)
  1015. >17    string        2.0         (2.0)
  1016. >17    string        1.0         (1.x)
  1017. 0    string        \<MakerScreenFont    FrameMaker Font file
  1018. >17    string        1.01         (%s)
  1019. 0    string        \<MML        FrameMaker MML file
  1020. 0    string        \<BookFile    FrameMaker Book file
  1021. >10    string        3.0         (3.0
  1022. >10    string        2.0         (2.0
  1023. >10    string        1.0         (1.0
  1024. >13    byte        x          %c)
  1025. # XXX - this book entry should be verified, if you find one, uncomment this
  1026. #0    string        \<Book\     FrameMaker Book (ASCII) file
  1027. #>6    string        3.0         (3.0)
  1028. #>6    string        2.0         (2.0)
  1029. #>6    string        1.0         (1.0)
  1030. 0    string        \<Maker    Intermediate Print File    FrameMaker IPL file
  1031.  
  1032. #------------------------------------------------------------------------------
  1033. # hp:  file(1) magic for Hewlett Packard machines (see also "printer")
  1034. #
  1035. # XXX - somebody should figure out whether any byte order needs to be
  1036. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  1037. # big-endian as it was mostly 68K-based.
  1038. #
  1039. # HP-PA is big-endian, so it (and "800", which is *also* HP-PA-based; I
  1040. # assume "HPPA-RISC1.1" really means "HP-PA Version 1.1", which first
  1041. # showed up in the 700 series, although later 800 series machines are,
  1042. # I think, based on the PA7100 which implements HP-PA 1.1) are flagged
  1043. # as big-endian.
  1044. #
  1045. # I think the 500 series was the old stack-based machines, running a
  1046. # UNIX environment atop the "SUN kernel"; dunno whether it was
  1047. # big-endian or little-endian.
  1048. #
  1049. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  1050. # hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
  1051. # HP magic is useful for reference, but using "long" magic is a better
  1052. # practice in order to avoid collisions.
  1053. #
  1054. # 0    beshort        200        hp200 (68010) BSD binary
  1055. # 0    beshort        300        hp300 (68020+68881) BSD binary
  1056. # 0    beshort        0x20c        hp200/300 HP-UX binary
  1057. # 0    beshort        0x20b        hp800 HP-UX binary
  1058.  
  1059. #
  1060. # The "misc" stuff needs a byte order; the archives look suspiciously
  1061. # like the old 177545 archives (0xff65 = 0177545).
  1062. #
  1063. #### Old Apollo stuff
  1064. 0    beshort        0627        Apollo m68k COFF executable
  1065. >18    beshort        ^040000        not stripped
  1066. >22    beshort        >0        - version %ld
  1067. 0    beshort        0624        apollo a88k COFF executable
  1068. >18    beshort        ^040000        not stripped
  1069. >22    beshort        >0        - version %ld
  1070. 0       long            01203604016     TML 0123 byte-order format
  1071. 0       long            01702407010     TML 1032 byte-order format
  1072. 0       long            01003405017     TML 2301 byte-order format
  1073. 0       long            01602007412     TML 3210 byte-order format
  1074. #### HPPA
  1075. 0    belong         0x02100106    HPPA-RISC1.1 relocatable object
  1076. 0    belong         0x02100107    HPPA-RISC1.1 executable
  1077. >(144)    belong        0x054ef630    dynamically linked
  1078. >96    belong        >0        - not stripped
  1079.  
  1080. 0    belong         0x02100108    HPPA-RISC1.1 shared executable
  1081. >(144)    belong        0x054ef630    dynamically linked
  1082. >96    belong        >0        - not stripped
  1083.  
  1084. 0    belong         0x0210010b    HPPA-RISC1.1 demand-load executable
  1085. >(144)    belong        0x054ef630    dynamically linked
  1086. >96    belong        >0        - not stripped
  1087.  
  1088. 0    belong         0x0210010e    HPPA-RISC1.1 shared library
  1089. >96    belong        >0        - not stripped
  1090.  
  1091. 0    belong         0x0210010d    HPPA-RISC1.1 dynamic load library
  1092. >96    belong        >0        - not stripped
  1093.  
  1094. #### 800
  1095. 0    belong         0x020b0106    HP s800 relocatable object
  1096.  
  1097. 0    belong         0x020b0107    HP s800 executable
  1098. >(144)    belong        0x054ef630    dynamically linked
  1099. >96    belong        >0        - not stripped
  1100.  
  1101. 0    belong         0x020b0108    HP s800 shared executable
  1102. >(144)    belong        0x054ef630    dynamically linked
  1103. >96    belong        >0        - not stripped
  1104.  
  1105. 0    belong         0x020b010b    HP s800 demand-load executable
  1106. >(144)    belong        0x054ef630    dynamically linked
  1107. >96    belong        >0        - not stripped
  1108.  
  1109. 0    belong         0x020b010e    HP s800 shared library
  1110. >96    belong        >0        - not stripped
  1111.  
  1112. 0    belong         0x020b010d    HP s800 dynamic load library
  1113. >96    belong        >0        - not stripped
  1114.  
  1115. 0    belong        0x213c6172    archive file
  1116. >68    belong         0x020b0619    - HP s800 relocatable library
  1117.  
  1118. #### 500
  1119. 0    long        0x02080106    HP s500 relocatable executable
  1120. >16    long        >0        - version %ld
  1121.  
  1122. 0    long        0x02080107    HP s500 executable
  1123. >16    long        >0        - version %ld
  1124.  
  1125. 0    long        0x02080108    HP s500 pure executable
  1126. >16    long        >0        - version %ld
  1127.  
  1128. #### 200
  1129. 0    belong         0x020c0108    HP s200 pure executable
  1130. >4    beshort        >0        - version %ld
  1131. >8    belong        &0x80000000    save fp regs
  1132. >8    belong        &0x40000000    dynamically linked
  1133. >8    belong        &0x20000000    debuggable
  1134. >36    belong        >0        not stripped
  1135.  
  1136. 0    belong        0x020c0107    HP s200 executable
  1137. >4    beshort        >0        - version %ld
  1138. >8    belong        &0x80000000    save fp regs
  1139. >8    belong        &0x40000000    dynamically linked
  1140. >8    belong        &0x20000000    debuggable
  1141. >36    belong        >0        not stripped
  1142.  
  1143. 0    belong        0x020c010b    HP s200 demand-load executable
  1144. >4    beshort        >0        - version %ld
  1145. >8    belong        &0x80000000    save fp regs
  1146. >8    belong        &0x40000000    dynamically linked
  1147. >8    belong        &0x20000000    debuggable
  1148. >36    belong        >0        not stripped
  1149.  
  1150. 0    belong        0x020c0106    HP s200 relocatable executable
  1151. >4    beshort        >0        - version %ld
  1152. >6    beshort        >0        - highwater %d
  1153. >8    belong        &0x80000000    save fp regs
  1154. >8    belong        &0x20000000    debuggable
  1155. >8    belong        &0x10000000    PIC
  1156.  
  1157. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  1158. >4    beshort        >0        - version %ld
  1159. >36    belong        >0        not stripped
  1160.  
  1161. 0    belong        0x020a0107    HP s200 (2.x release) executable
  1162. >4    beshort        >0        - version %ld
  1163. >36    belong        >0        not stripped
  1164.  
  1165. 0    belong        0x020c010e    HP s200 shared library
  1166. >4    beshort        >0        - version %ld
  1167. >6    beshort        >0        - highwater %d
  1168. >36    belong        >0        not stripped
  1169.  
  1170. 0    belong        0x020c010d    HP s200 dynamic load library
  1171. >4    beshort        >0        - version %ld
  1172. >6    beshort        >0        - highwater %d
  1173. >36    belong        >0        not stripped
  1174.  
  1175. #### MISC
  1176. 0    long        0x0000ff65    HP old archive
  1177. 0    long        0x020aff65    HP s200 old archive
  1178. 0    long        0x020cff65    HP s200 old archive
  1179. 0    long        0x0208ff65    HP s500 old archive
  1180.  
  1181. 0    long        0x015821a6    HP core file
  1182.  
  1183. 0    long        0x4da7eee8    HP-WINDOWS font
  1184. >8    byte        >0        - version %ld
  1185. 0    string        Bitmapfile    HP Bitmapfile
  1186.  
  1187. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  1188. # XXX - see "lif"
  1189. 0    short        0x8000        lif file
  1190. 0    long        0x020c010c    compiled Lisp
  1191.  
  1192. 0    string        msgcat01    HP NLS message catalog,
  1193. >8    long        >0        %d messages
  1194.  
  1195. # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
  1196. 0    string        HPHP48-        HP48 binary
  1197. >7    byte        >0        - Rev %c
  1198. >8    short        0x1129        (ADR)
  1199. >8    short        0x3329        (REAL)
  1200. >8    short        0x5529        (LREAL)
  1201. >8    short        0x7729        (COMPLX)
  1202. >8    short        0x9d29        (LCOMPLX)
  1203. >8    short        0xbf29        (CHAR)
  1204. >8    short        0xe829        (ARRAY)
  1205. >8    short        0x0a2a        (LNKARRAY)
  1206. >8    short        0x2c2a        (STRING)
  1207. >8    short        0x4e2a        (HXS)
  1208. >8    short        0x742a        (LIST)
  1209. >8    short        0x962a        (DIR)
  1210. >8    short        0xb82a        (ALG)
  1211. >8    short        0xda2a        (UNIT)
  1212. >8    short        0xfc2a        (TAGGED)
  1213. >8    short        0x1e2b        (GROB)
  1214. >8    short        0x402b        (LIB)
  1215. >8    short        0x622b        (BACKUP)
  1216. >8    short        0x882b        (LIBDATA)
  1217. >8    short        0x9d2d        (PROG)
  1218. >8    short        0xcc2d        (CODE)
  1219. >8    short        0x482e        (GNAME)
  1220. >8    short        0x6d2e        (LNAME)
  1221. >8    short        0x922e        (XLIB)
  1222. 0    string        %%HP:        HP48 text
  1223. >6    string        T(0)        - T(0)
  1224. >6    string        T(1)        - T(1)
  1225. >6    string        T(2)        - T(2)
  1226. >6    string        T(3)        - T(3)
  1227. >10    string        A(D)        A(D)
  1228. >10    string        A(R)        A(R)
  1229. >10    string        A(G)        A(G)
  1230. >14    string        F(.)        F(.);
  1231. >14    string        F(,)        F(,);
  1232.  
  1233. # hpBSD magic numbers
  1234. 0    beshort        200        hp200 (68010) BSD
  1235. >2    beshort        0407        impure binary
  1236. >2    beshort        0410        read-only binary
  1237. >2    beshort        0413        demand paged binary
  1238. 0    beshort        300        hp300 (68020+68881) BSD
  1239. >2    beshort        0407        impure binary
  1240. >2    beshort        0410        read-only binary
  1241. >2    beshort        0413        demand paged binary
  1242.  
  1243.  
  1244. #------------------------------------------------------------------------------
  1245. # ibm370:  file(1) magic for IBM 370 and compatibles.
  1246. #
  1247. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  1248. # What the heck *is* "USS/370"?
  1249. #
  1250. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  1251. >12    belong        >0        not stripped
  1252. >24     belong        >0        - version %ld
  1253. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  1254. >12    belong        >0        not stripped
  1255. >24    belong        >0        - version %ld
  1256. 0    beshort        0530        SVR2 pure executable (USS/370)
  1257. >12    belong        >0        not stripped
  1258. >24    belong        >0        - version %ld
  1259. 0    beshort        0535        SVR2 executable (USS/370)
  1260. >12    belong        >0        not stripped
  1261. >24    belong        >0        - version %ld
  1262.  
  1263. #------------------------------------------------------------------------------
  1264. # ibm6000:  file(1) magic for RS/6000 and the RT PC.
  1265. #
  1266. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  1267. >12    belong        >0        not stripped
  1268. # Breaks sun4 statically linked execs.
  1269. #0      beshort        0x0103        executable (RT Version 2) or obj module
  1270. #>2    byte        0x50        pure
  1271. #>28    belong        >0        not stripped
  1272. #>6    beshort        >0        - version %ld
  1273. 0    beshort        0x0104        shared library
  1274. 0    beshort        0x0105        ctab data
  1275. 0    beshort        0xfe04        structured file
  1276. 0    string        0xabcdef    message catalog
  1277. 0    string        \<aiaff>    archive
  1278.  
  1279. #------------------------------------------------------------------------------
  1280. # iff:    file(1) magic for Interchange File Format (see also "audio" & "images")
  1281. #
  1282. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  1283. # Arts for file interchange.  It has also been used by Apple, SGI, and
  1284. # especially Commodore-Amiga.
  1285. #
  1286. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  1287. # FORM type, which is followed by the first chunk in the FORM.
  1288.  
  1289. 0    string        FORM        IFF data
  1290. #>4    belong        x        \b, FORM is %d bytes long
  1291. # audio formats
  1292. >8    string        AIFF        \b, AIFF audio
  1293. >8    string        AIFC        \b, AIFF-C compressed audio
  1294. >8    string        8SVX        \b, 8SVX 8-bit sampled sound voice
  1295. >8    string        SAMP        \b, SAMP sampled audio
  1296. # image formats
  1297. >8    string        ILBMBMHD    \b, ILBM interleaved image
  1298. >>20    beshort        x        \b, %d x
  1299. >>22    beshort        x        %d
  1300. >8    string        RGBN        \b, RGBN 12-bit RGB image
  1301. >8    string        RGB8        \b, RGB8 24-bit RGB image
  1302. >8    string        DR2D        \b, DR2D 2-D object
  1303. >8    string        TDDD        \b, TDDD 3-D rendering
  1304. # other formats
  1305. >8    string        FTXT        \b, FTXT formatted text
  1306.  
  1307. #------------------------------------------------------------------------------
  1308. # images:  file(1) magic for image formats (see also "iff")
  1309. #
  1310. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  1311. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  1312. # merging several one- and two-line files into here.
  1313. #
  1314. # little magic: PCX (first byte is 0x0a)
  1315. # no magic: Targa
  1316.  
  1317. # PBMPLUS images
  1318. # The next byte following the magic is always whitespace.
  1319. 0    string        P1        PBM image text
  1320. 0    string        P2        PGM image text
  1321. 0    string        P3        PPM image text
  1322. 0    string        P4        PBM "rawbits" image data
  1323. 0    string        P5        PGM "rawbits" image data
  1324. 0    string        P6        PPM "rawbits" image data
  1325.  
  1326. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  1327. 0    string        IIN1        NIFF image data
  1328.  
  1329. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  1330. # The second word of TIFF files is the TIFF version number, 42, which has
  1331. # never changed.  The TIFF specification recommends testing for it.
  1332. 0    string        MM\x00\x2a    TIFF image data, big-endian
  1333. 0    string        II\x2a\x00    TIFF image data, little-endian
  1334.  
  1335. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  1336. # (Greg Roelofs, newt@uchicago.edu)
  1337. #
  1338. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  1339. #
  1340. 0    string        \x89PNG        PNG image data,
  1341. >4    belong        !0x0d0a1a0a    CORRUPTED,
  1342. >16    belong        x        %ld x
  1343. >20    belong        x        %ld,
  1344. >24    byte        x        %d-bit
  1345. >25    byte        0        grayscale,
  1346. >25    byte        2        \b/color RGB,
  1347. >25    byte        3        colormap,
  1348. >25    byte        4        gray+alpha,
  1349. >25    byte        6        \b/color RGBA,
  1350. #>26    byte        0        deflate/32K,
  1351. >28    byte        0        non-interlaced
  1352. >28    byte        1        interlaced
  1353.  
  1354. # GIF
  1355. 0    string        GIF8        GIF image data
  1356. >4    string        7a        \b, version 8%s,
  1357. >4    string        9a        \b, version 8%s,
  1358. >6    leshort        >0        %hd x
  1359. >8    leshort        >0        %hd,
  1360. #>10    byte        &0x80        color mapped,
  1361. #>10    byte&0x07    =0x00        2 colors
  1362. #>10    byte&0x07    =0x01        4 colors
  1363. #>10    byte&0x07    =0x02        8 colors
  1364. #>10    byte&0x07    =0x03        16 colors
  1365. #>10    byte&0x07    =0x04        32 colors
  1366. #>10    byte&0x07    =0x05        64 colors
  1367. #>10    byte&0x07    =0x06        128 colors
  1368. #>10    byte&0x07    =0x07        256 colors
  1369.  
  1370. # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
  1371. # 1 plane, no encoding.
  1372. 0    string        \361\0\100\273    CMU window manager raster image data
  1373. >4    lelong        >0        %d x
  1374. >8    lelong        >0        %d,
  1375. >12    lelong        >0        %d-bit
  1376.  
  1377. # Magick Image File Format
  1378. 0    string        id=ImageMagick    MIFF image data
  1379.  
  1380. # Artisan
  1381. 0    long        1123028772    Artisan image data
  1382. >4    long        1        \b, rectangular 24-bit
  1383. >4    long        2        \b, rectangular 8-bit with colormap
  1384. >4    long        3        \b, rectangular 32-bit (24-bit with matte)
  1385.  
  1386. # FIG (Facility for Interactive Generation of figures), an object-based format
  1387. 0    string        #FIG        FIG image text
  1388. >5    string        x        \b, version %.3s
  1389.  
  1390. # PHIGS
  1391. 0    string        ARF_BEGARF        PHIGS clear text archive
  1392. 0    string        @(#)SunPHIGS        SunPHIGS
  1393. # version number follows, in the form m.n
  1394. >40    string        SunBin            binary
  1395. >32    string        archive            archive
  1396.  
  1397. # GKS (Graphics Kernel System)
  1398. 0    string        GKSM        GKS Metafile
  1399. >24    string        SunGKS        \b, SunGKS
  1400.  
  1401. # CGM image files
  1402. 0    string        BEGMF        clear text Computer Graphics Metafile
  1403. # XXX - questionable magic
  1404. 0    beshort&0xffe0    0x0020        binary Computer Graphics Metafile
  1405. 0    beshort        0x3020        character Computer Graphics Metafile
  1406.  
  1407. # MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  1408. 0    string    yz    MGR bitmap, modern format, 8-bit aligned
  1409. 0    string    zz    MGR bitmap, old format, 1-bit deep, 16-bit aligned
  1410. 0    string    xz    MGR bitmap, old format, 1-bit deep, 32-bit aligned
  1411. 0    string    yx    MGR bitmap, modern format, squeezed
  1412.  
  1413. # Fuzzy Bitmap (FBM) images
  1414. 0    string        %bitmap\0    FBM image data
  1415. >30    long        0x31        \b, mono
  1416. >30    long        0x33        \b, color
  1417.  
  1418. # facsimile data
  1419. 1    string        PC\ Research,\ Inc    group 3 fax data
  1420. >29    byte        0        \b, normal resolution (204x98 DPI)
  1421. >29    byte        1        \b, fine resolution (204x196 DPI)
  1422.  
  1423. # JPEG images
  1424. 0    beshort        0xffd8        JPEG image data
  1425. >6    string        JFIF        \b, JFIF standard
  1426. # HSI is Handmade Software's proprietary JPEG encoding scheme
  1427. 0    string        hsi1        JPEG image data, HSI proprietary
  1428.  
  1429. # PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt@uchicago.edu)
  1430. 0    string        BM        PC bitmap data
  1431. >14    leshort        12        \b, OS/2 1.x format
  1432. >>18    leshort        x        \b, %d x
  1433. >>20    leshort        x        %d
  1434. >14    leshort        64        \b, OS/2 2.x format
  1435. >>18    leshort        x        \b, %d x
  1436. >>20    leshort        x        %d
  1437. >14    leshort        40        \b, Windows 3.x format
  1438. >>18    lelong        x        \b, %d x
  1439. >>22    lelong        x        %d x
  1440. >>28    leshort        x        %d
  1441. 0    string        IC        PC icon data
  1442. 0    string        PI        PC pointer image data
  1443. 0    string        CI        PC color icon data
  1444. 0    string        CP        PC color pointer image data
  1445. # Conflicts with other entries [BABYL]
  1446. #0    string        BA        PC bitmap array data
  1447.  
  1448. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  1449. # note possible collision with C/REXX entry in c-lang; currently commented out
  1450. 0    string        /*\ XPM\ */    X pixmap image text
  1451.  
  1452. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  1453. 0    leshort        0xcc52        RLE image data,
  1454. >6    leshort        x        %d x
  1455. >8    leshort        x        %d
  1456. >2    leshort        >0        \b, lower left corner: %d
  1457. >4    leshort        >0        \b, lower right corner: %d
  1458. >10    byte&0x1    =0x1        \b, clear first
  1459. >10    byte&0x2    =0x2        \b, no background
  1460. >10    byte&0x4    =0x4        \b, alpha channel
  1461. >10    byte&0x8    =0x8        \b, comment
  1462. >11    byte        >0        \b, %d color channels
  1463. >12    byte        >0        \b, %d bits per pixel
  1464. >13    byte        >0        \b, %d color map channels
  1465.  
  1466. # image file format (Robert Potter, potter@cs.rochester.edu)
  1467. 0    string        Imagefile\ version-    iff image data
  1468. # this adds the whole header (inc. version number), informative but longish
  1469. >10    string        >\0        %s
  1470.  
  1471. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  1472. 0    belong        0x59a66a95    Sun raster image data
  1473. >4    belong        >0        \b, %d x
  1474. >8    belong        >0        %d,
  1475. >12    belong        >0        %d-bit,
  1476. #>16    belong        >0        %d bytes long,
  1477. >20    belong        0        old format,
  1478. #>20    belong        1        standard,
  1479. >20    belong        2        compressed,
  1480. >20    belong        3        RGB,
  1481. >20    belong        4        TIFF,
  1482. >20    belong        5        IFF,
  1483. >20    belong        0xffff        reserved for testing,
  1484. >24    belong        0        no colormap
  1485. >24    belong        1        RGB colormap
  1486. >24    belong        2        raw colormap
  1487. #>28    belong        >0        colormap is %d bytes long
  1488.  
  1489. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  1490. # file://sgi.com/graphics/SGIIMAGESPEC
  1491. 0    beshort        474        SGI image data
  1492. #>2    byte        0        \b, verbatim
  1493. >2    byte        1        \b, RLE
  1494. #>3    byte        1        \b, normal precision
  1495. >3    byte        2        \b, high precision
  1496. >4    beshort        x        \b, %d-D
  1497. >6    beshort        x        \b, %d x
  1498. >8    beshort        x        %d
  1499. >10    beshort        x        \b, %d channel
  1500. >10    beshort        !1        \bs
  1501. >80    string        >0        \b, "%s"
  1502.  
  1503. 0    string        IT01        FIT image data
  1504. >4    belong        x        \b, %d x
  1505. >8    belong        x        %d x
  1506. >12    belong        x        %d
  1507. #
  1508. 0    string        IT02        FIT image data
  1509. >4    belong        x        \b, %d x
  1510. >8    belong        x        %d x
  1511. >12    belong        x        %d
  1512. #
  1513. 2048    string        PCD_IPI        Kodak Photo CD image pack file
  1514. 0    string        PCD_OPA        Kodak Photo CD overview pack file
  1515.  
  1516. # FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  1517. # FITS is the Flexible Image Transport System, the de facto standard for
  1518. # data and image transfer, storage, etc., for the astronomical community.
  1519. # (FITS floating point formats are big-endian.)
  1520. 0    string    SIMPLE\ \ =    FITS image data
  1521. >109    string    8        \b, 8-bit, character or unsigned binary integer
  1522. >108    string    16        \b, 16-bit, two's complement binary integer
  1523. >107    string    \ 32        \b, 32-bit, two's complement binary integer
  1524. >107    string    -32        \b, 32-bit, floating point, single precision
  1525. >107    string    -64        \b, 64-bit, floating point, double precision
  1526.  
  1527. # other images
  1528. 0    string    This\ is\ a\ BitMap\ file    Lisp Machine bit-array-file
  1529. 0    string        !!        Bennet Yee's "face" format
  1530.  
  1531. #------------------------------------------------------------------------------
  1532. # intel:  file(1) magic for x86 Unix
  1533. #
  1534. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  1535. # is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
  1536. # Windows as well.
  1537. #
  1538. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  1539. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  1540. # as well, if, as, and when IBM makes it portable.
  1541. #
  1542. # The `versions' should be un-commented if they work for you.
  1543. # (Was the problem just one of endianness?)
  1544. #
  1545. 0    leshort        0502        basic-16 executable
  1546. >12    lelong        >0        not stripped
  1547. #>22    leshort        >0        - version %ld
  1548. 0    leshort        0503        basic-16 executable (TV)
  1549. >12    lelong        >0        not stripped
  1550. #>22    leshort        >0        - version %ld
  1551. 0    leshort        0510        x86 executable
  1552. >12    lelong        >0        not stripped
  1553. 0    leshort        0511        x86 executable (TV)
  1554. >12    lelong        >0        not stripped
  1555. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  1556. >12    lelong        >0        not stripped
  1557. #>22    leshort        >0        - version %ld
  1558. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  1559. >12    lelong        >0        not stripped
  1560. #>22    leshort        >0        - version %ld
  1561. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  1562. 0    leshort        =0514        80386 COFF executable
  1563. >12    lelong        >0        not stripped
  1564. >22    leshort        >0        - version %ld
  1565.  
  1566. #------------------------------------------------------------------------------
  1567. # interleaf:  file(1) magic for InterLeaf TPS:
  1568. #
  1569. 0    string        =\210OPS    Interleaf saved data
  1570. 0    string        =<!OPS        Interleaf document text
  1571. >5    string        ,\ Version\ =    \b, version
  1572. >>17    string        >\0        %.3s
  1573.  
  1574. #------------------------------------------------------------------------------
  1575. # ispell:  file(1) magic for ispell
  1576. #
  1577. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
  1578. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  1579. # (No other current magic entries collide.)
  1580. #
  1581. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  1582. #
  1583. 0    leshort&0xFFFC    0x9600        little endian ispell
  1584. >0    byte        0        hash file (?),
  1585. >0    byte        1        3.0 hash file,
  1586. >0    byte        2        3.1 hash file,
  1587. >0    byte        3        hash file (?),
  1588. >2    leshort        0x00        8-bit, no capitalization, 26 flags
  1589. >2    leshort        0x01        7-bit, no capitalization, 26 flags
  1590. >2    leshort        0x02        8-bit, capitalization, 26 flags
  1591. >2    leshort        0x03        7-bit, capitalization, 26 flags
  1592. >2    leshort        0x04        8-bit, no capitalization, 52 flags
  1593. >2    leshort        0x05        7-bit, no capitalization, 52 flags
  1594. >2    leshort        0x06        8-bit, capitalization, 52 flags
  1595. >2    leshort        0x07        7-bit, capitalization, 52 flags
  1596. >2    leshort        0x08        8-bit, no capitalization, 128 flags
  1597. >2    leshort        0x09        7-bit, no capitalization, 128 flags
  1598. >2    leshort        0x0A        8-bit, capitalization, 128 flags
  1599. >2    leshort        0x0B        7-bit, capitalization, 128 flags
  1600. >2    leshort        0x0C        8-bit, no capitalization, 256 flags
  1601. >2    leshort        0x0D        7-bit, no capitalization, 256 flags
  1602. >2    leshort        0x0E        8-bit, capitalization, 256 flags
  1603. >2    leshort        0x0F        7-bit, capitalization, 256 flags
  1604. >4    leshort        >0        and %d string characters
  1605. 0    beshort&0xFFFC    0x9600        big endian ispell
  1606. >1    byte        0        hash file (?),
  1607. >1    byte        1        3.0 hash file,
  1608. >1    byte        2        3.1 hash file,
  1609. >1    byte        3        hash file (?),
  1610. >2    beshort        0x00        8-bit, no capitalization, 26 flags
  1611. >2    beshort        0x01        7-bit, no capitalization, 26 flags
  1612. >2    beshort        0x02        8-bit, capitalization, 26 flags
  1613. >2    beshort        0x03        7-bit, capitalization, 26 flags
  1614. >2    beshort        0x04        8-bit, no capitalization, 52 flags
  1615. >2    beshort        0x05        7-bit, no capitalization, 52 flags
  1616. >2    beshort        0x06        8-bit, capitalization, 52 flags
  1617. >2    beshort        0x07        7-bit, capitalization, 52 flags
  1618. >2    beshort        0x08        8-bit, no capitalization, 128 flags
  1619. >2    beshort        0x09        7-bit, no capitalization, 128 flags
  1620. >2    beshort        0x0A        8-bit, capitalization, 128 flags
  1621. >2    beshort        0x0B        7-bit, capitalization, 128 flags
  1622. >2    beshort        0x0C        8-bit, no capitalization, 256 flags
  1623. >2    beshort        0x0D        7-bit, no capitalization, 256 flags
  1624. >2    beshort        0x0E        8-bit, capitalization, 256 flags
  1625. >2    beshort        0x0F        7-bit, capitalization, 256 flags
  1626. >4    beshort        >0        and %d string characters
  1627. #------------------------------------------------------------
  1628. # Java ByteCode
  1629. 0    belong        0xcafebabe
  1630. >4    belong        0x0003002d    Java bytecode
  1631.  
  1632. #------------------------------------------------------------------------------
  1633. # karma:  file(1) magic for Karma data files
  1634. #
  1635. # From <rgooch@atnf.csiro.au>
  1636.  
  1637. 0    string        KarmaRHD Version    Karma Data Structure Version
  1638. >16    long        x        %lu
  1639.  
  1640. #------------------------------------------------------------------------------
  1641. # lex:  file(1) magic for lex
  1642. #
  1643. #    derived empirically, your offsets may vary!
  1644. 53    string        yyprevious    C program text (from lex)
  1645. >3    string        >\0         for %s
  1646. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  1647. 21    string        generated\ by\ flex    C program text (from flex)
  1648. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  1649. 0    string        %{        lex description text
  1650.  
  1651. #------------------------------------------------------------------------------
  1652. # lif:  file(1) magic for lif
  1653. #
  1654. # XXX - byte order?  (Probably beshort, Daniel Quinlan <quinlan@yggdrasil.com>)
  1655. #
  1656. 0    short        0x8000        lif file
  1657.  
  1658. #------------------------------------------------------------------------------
  1659. # linux:  file(1) magic for Linux files
  1660. #
  1661. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  1662. # The following basic Linux magic is useful for reference, but using
  1663. # "long" magic is a better practice in order to avoid collisions.
  1664. #
  1665. # 2    leshort        100        Linux/i386
  1666. # >0    leshort        0407        impure executable (OMAGIC)
  1667. # >0    leshort        0410        pure executable (NMAGIC)
  1668. # >0    leshort        0413        demand-paged executable (ZMAGIC)
  1669. # >0    leshort        0314        demand-paged executable (QMAGIC)
  1670. #
  1671. 0    lelong        0x00640107    Linux/i386 impure executable (OMAGIC)
  1672. >16    lelong        0        \b, stripped
  1673. 0    lelong        0x00640108    Linux/i386 pure executable (NMAGIC)
  1674. >16    lelong        0        \b, stripped
  1675. 0    lelong        0x0064010b    Linux/i386 demand-paged executable (ZMAGIC)
  1676. >16    lelong        0        \b, stripped
  1677. 0    lelong        0x006400cc    Linux/i386 demand-paged executable (QMAGIC)
  1678. >16    lelong        0        \b, stripped
  1679. #
  1680. 0    string        \007\001\000    Linux/i386 object file
  1681. >20    lelong        >0x1020        \b, DLL library
  1682. # message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
  1683. 0    string        *nazgul*    compiled message catalog
  1684. >8    lelong        >0        \b, version %ld
  1685. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  1686. 216    lelong        0421        Linux/i386 core file
  1687. >220    string        >\0        of '%s'
  1688. >200    lelong        >0        (signal %d)
  1689. #
  1690. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  1691. # this can be overridden by the DOS executable (COM) entry
  1692. 2    string        LILO        Linux/i386 LILO boot/chain loader
  1693. #
  1694. # Debian Packages, from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  1695. 0    string        0.9
  1696. >8    byte        0x0a        Debian Binary Package
  1697. >>3    byte        >0        \b, created by dpkg 0.9%c
  1698. >>4    byte        >0        pl%c
  1699. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  1700. 0    leshort        0x0436        Linux/i386 PC Screen Font data,
  1701. >2    byte        0        256 characters, no directory,
  1702. >2    byte        1        512 characters, no directory,
  1703. >2    byte        2        256 characters, Unicode directory,
  1704. >2    byte        3        512 characters, Unicode directory,
  1705. >3    byte        >0        8x%d
  1706. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  1707. 4086    string        SWAP-SPACE    Linux/i386 swap file
  1708. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  1709. #
  1710. #    from Erik Troan (ewt@redhat.com) examining od dumps, so this
  1711. #        could be wrong
  1712. #      updated by David Mosberger (davidm@azstarnet.com) based on
  1713. #      GNU BFD and MIPS info found below.
  1714. #
  1715. 0    leshort        0x0183        ECOFF alpha
  1716. >24    leshort        0407        executable
  1717. >24    leshort        0410        pure
  1718. >24    leshort        0413        demand paged
  1719. >8    long        >0        not stripped
  1720. >8    long        0        stripped
  1721. >23    leshort        >0        - version %ld.
  1722. # linux Kernel images version 1.3.80 - ?
  1723. # from Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  1724. 0       belong          0xb8c0078e      Linux/x86 kernel image,
  1725. >0x048c byte            0x31
  1726. >>0x048c string         x               version %s
  1727. >0x0493 byte            0x31
  1728. >>0x0493 string         x               version %s
  1729. #
  1730.  
  1731. #------------------------------------------------------------------------------
  1732. # lisp:  file(1) magic for lisp programs
  1733. #
  1734. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  1735. 0    string    ;;            Lisp/Scheme program text
  1736. # Emacs 18 - this is always correct, but not very magical.
  1737. 0    string    \012(            byte-compiled Emacs-Lisp program data
  1738. # Emacs 19
  1739. 0    string    ;ELC\023\000\000\000    byte-compiled Emacs-Lisp program data
  1740. #------------------------------------------------------------------------------
  1741. # mach file description
  1742. #
  1743. 0    belong        0xcafebabe    mach-o fat file
  1744. >4    belong        1        with 1 architecture
  1745. >4    belong        >1
  1746. >>4    belong        x        with %ld architectures        
  1747. #
  1748. 0    belong        0xfeedface    mach-o
  1749. >12    belong        1        object
  1750. >12    belong        2        executable
  1751. >12    belong        3        shared library
  1752. >12    belong        4        core
  1753. >12    belong        5        preload executable
  1754. >12    belong        >5
  1755. >>12    belong        x        filetype=%ld
  1756. >4    belong        <0
  1757. >>4    belong        x        architecture=%ld
  1758. >4    belong        1        vax
  1759. >4    belong        2        romp
  1760. >4    belong        3        architecture=3
  1761. >4    belong        4        ns32032
  1762. >4    belong        5        ns32332
  1763. >4    belong        6        for m68k architecture
  1764. >4    belong        7        i386
  1765. >4    belong        8        mips
  1766. >4    belong        9        ns32532
  1767. >4    belong        10        architecture=10
  1768. >4    belong        11        hp pa-risc
  1769. >4    belong        12        acorn
  1770. >4    belong        13        m88k
  1771. >4    belong        14        sparc
  1772. >4    belong        15        i860-big
  1773. >4    belong        16        i860
  1774. >4    belong        17        rs6000
  1775. >4    belong        18        powerPC
  1776. >4    belong        >18
  1777. >>4    belong        x        architecture=%ld
  1778.  
  1779. #------------------------------------------------------------------------------
  1780. # magic:  file(1) magic for magic files
  1781. #
  1782. 0    string        #\ Magic    magic text file for file(1) cmd
  1783.  
  1784. #------------------------------------------------------------------------------
  1785. # mail.news:  file(1) magic for mail and news
  1786. #
  1787. # Unfortunately, saved netnews also has From line added in some news software.
  1788. #0    string        From         mail text
  1789. # There are tests to ascmagic.c to cope with mail and news.
  1790. 0    string        Relay-Version:     old news text
  1791. 0    string        #!\ rnews    batched news text
  1792. 0    string        N#!\ rnews    mailed, batched news text
  1793. 0    string        Forward\ to     mail forwarding text
  1794. 0    string        Pipe\ to     mail piping text
  1795. 0    string        Return-Path:    smtp mail text
  1796. 0    string        Path:        news text
  1797. 0    string        Xref:        news text
  1798. 0    string        From:        news or mail text
  1799. 0    string        Article     saved news text
  1800. 0    string        BABYL        Emacs RMAIL text
  1801. 0    string        Received:    RFC 822 mail message
  1802. 0    string        MIME-Version:    MIME entity
  1803. 0    string        Content-    MIME entity
  1804.  
  1805. #------------------------------------------------------------------------------
  1806. # microsoft:  file(1) magic for Microsoft Xenix
  1807. #
  1808. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  1809. # model" lifted from "magic.xenix", with comment "derived empirically;
  1810. # treat as folklore until proven"
  1811. #
  1812. # "small model", "large model", "huge model" stuff lifted from XXX
  1813. #
  1814. # XXX - "x.out" collides with PDP-11 archives
  1815. #
  1816. 0    string        core        core file (Xenix)
  1817. 0    byte        0x80        8086 relocatable (Microsoft)
  1818. 0    leshort        0xff65        x.out
  1819. >2    string        __.SYMDEF     randomized
  1820. >0    byte        x        archive
  1821. 0    leshort        0x206        Microsoft a.out
  1822. >8    leshort        1        Middle model
  1823. >0x1e    leshort        &0x10        overlay
  1824. >0x1e    leshort        &0x2        separate
  1825. >0x1e    leshort        &0x4        pure
  1826. >0x1e    leshort        &0x800        segmented
  1827. >0x1e    leshort        &0x400        standalone
  1828. >0x1e    leshort        &0x8        fixed-stack
  1829. >0x1c    byte        &0x80        byte-swapped
  1830. >0x1c    byte        &0x40        word-swapped
  1831. >0x10    lelong        >0        not-stripped
  1832. >0x1e    leshort        ^0xc000        pre-SysV
  1833. >0x1e    leshort        &0x4000        V2.3
  1834. >0x1e    leshort        &0x8000        V3.0
  1835. >0x1c    byte        &0x4        86
  1836. >0x1c    byte        &0xb        186
  1837. >0x1c    byte        &0x9        286
  1838. >0x1c    byte        &0xa        386
  1839. >0x1f    byte        <0x040        small model
  1840. >0x1f    byte        =0x048        large model    
  1841. >0x1f    byte        =0x049        huge model 
  1842. >0x1e    leshort        &0x1        executable
  1843. >0x1e    leshort        ^0x1        object file
  1844. >0x1e    leshort        &0x40        Large Text
  1845. >0x1e    leshort        &0x20        Large Data
  1846. >0x1e    leshort        &0x120        Huge Objects Enabled
  1847. >0x10    lelong        >0        not stripped
  1848.  
  1849. 0    leshort        0x140        old Microsoft 8086 x.out
  1850. >0x3    byte        &0x4        separate
  1851. >0x3    byte        &0x2        pure
  1852. >0    byte        &0x1        executable
  1853. >0    byte        ^0x1        relocatable
  1854. >0x14    lelong        >0        not stripped
  1855.  
  1856. 0    lelong        0x206        b.out
  1857. >0x1e    leshort        &0x10        overlay
  1858. >0x1e    leshort        &0x2        separate
  1859. >0x1e    leshort        &0x4        pure
  1860. >0x1e    leshort        &0x800        segmented
  1861. >0x1e    leshort        &0x400        standalone
  1862. >0x1e    leshort        &0x1        executable
  1863. >0x1e    leshort        ^0x1        object file
  1864. >0x1e    leshort        &0x4000        V2.3
  1865. >0x1e    leshort        &0x8000        V3.0
  1866. >0x1c    byte        &0x4        86
  1867. >0x1c    byte        &0xb        186
  1868. >0x1c    byte        &0x9        286
  1869. >0x1c    byte        &0x29        286
  1870. >0x1c    byte        &0xa        386
  1871. >0x1e    leshort        &0x4        Large Text
  1872. >0x1e    leshort        &0x2        Large Data
  1873. >0x1e    leshort        &0x102        Huge Objects Enabled
  1874.  
  1875. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  1876.  
  1877. #------------------------------------------------------------------------------
  1878. # mirage:  file(1) magic for Mirage executables
  1879. #
  1880. # XXX - byte order?
  1881. #
  1882. 0    long    31415        Mirage Assembler m.out executable
  1883.  
  1884. #------------------------------------------------------------------------------
  1885. # mkid:  file(1) magic for mkid(1) databases
  1886. #
  1887. # ID is the binary tags database produced by mkid(1).
  1888. #
  1889. # XXX - byte order?
  1890. #
  1891. 0    string        \311\304    ID tags data
  1892. >2    short        >0        version %d
  1893.  
  1894. #------------------------------------------------------------------------------
  1895. # mmdf:  file(1) magic for MMDF mail files
  1896. #
  1897. 0    string    \001\001\001\001    MMDF mailbox
  1898.  
  1899. #------------------------------------------------------------------------------
  1900. # motorola:  file(1) magic for Motorola 68K and 88K binaries
  1901. #
  1902. # 68K
  1903. #
  1904. 0    beshort        0520        mc68k COFF
  1905. >18    beshort        ^00000020    object
  1906. >18    beshort        &00000020    executable
  1907. >12    belong        >0        not stripped
  1908. >168    string        .lowmem        Apple toolbox
  1909. >20    beshort        0407        (impure)
  1910. >20    beshort        0410        (pure)
  1911. >20    beshort        0413        (demand paged)
  1912. >20    beshort        0421        (standalone)
  1913. 0    beshort        0521        mc68k executable (shared)
  1914. >12    belong        >0        not stripped
  1915. 0    beshort        0522        mc68k executable (shared demand paged)
  1916. >12    belong        >0        not stripped
  1917. #
  1918. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  1919. #
  1920. 0    beshort        0554        68K BCS executable
  1921. #
  1922. # 88K
  1923. #
  1924. # Motorola/88Open BCS
  1925. #
  1926. 0    beshort        0555        88K BCS executable
  1927. #
  1928. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  1929. 0   string      S0          Motorola S-Record; binary data in text format
  1930.  
  1931. #------------------------------------------------------------------------------
  1932. # msdos:  file(1) magic for MS-DOS files
  1933. #
  1934.  
  1935. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  1936. 0    string    @echo\ off    MS-DOS batch file text
  1937.  
  1938. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  1939. #
  1940. 0    string    MZ        MS-DOS executable (EXE)
  1941. >24    string    @        \b, OS/2 or Windows
  1942. >1638    string    -lh5-        \b, LHa SFX archive v2.13S
  1943. >7195    string    Rar!        \b, RAR self-extracting archive
  1944. #
  1945. # [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
  1946. #   8161 bytes are ignored.  To make the following entries work, increase
  1947. #   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
  1948. #   NT/Win32 and VMS.]
  1949. # [GRR:  some company sells a self-extractor/displayer for image data(!)]
  1950. #
  1951. >11696    string    PK\003\004    \b, PKZIP SFX archive v1.1
  1952. >13297    string    PK\003\004    \b, PKZIP SFX archive v1.93a
  1953. >15588    string    PK\003\004    \b, PKZIP2 SFX archive v1.09
  1954. >15770    string    PK\003\004    \b, PKZIP SFX archive v2.04g
  1955. >28374    string    PK\003\004    \b, PKZIP2 SFX archive v1.02
  1956. #
  1957. # Info-ZIP self-extractors
  1958. #    these are the DOS versions:
  1959. >25115    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  1960. >26331    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  1961. #    these are the OS/2 versions (OS/2 is flagged above):
  1962. >47031    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  1963. >49845    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  1964. #    this is the NT/Win32 version:
  1965. >69120    string    PK\003\004    \b, Info-ZIP NT SFX archive v5.12 w/decryption
  1966. #
  1967. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  1968. >49801    string    \x79\xff\x80\xff\x76\xff    \b, CODEC archive v3.21
  1969. >>49824    leshort        =1            \b, 1 file
  1970. >>49824    leshort        >1            \b, %u files
  1971.  
  1972. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  1973. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  1974. # but it isn't feasible to match all COM files since there must be at least
  1975. # two dozen different one-byte "magics".
  1976. #0    byte        0xe9        MS-DOS executable (COM)
  1977. #0    byte        0x8c        MS-DOS executable (COM)
  1978. # 0xeb conflicts with "sequent" magic
  1979. #0    byte        0xeb        MS-DOS executable (COM)
  1980. #0    byte        0xb8        MS-DOS executable (COM)
  1981.  
  1982. # miscellaneous formats
  1983. 0    string        LZ        MS-DOS executable (built-in)
  1984. #0    byte        0xf0        MS-DOS program library data
  1985. #
  1986.  
  1987. # Popular applications
  1988. 2080    string    Microsoft\ Word\ 6.0\ Document    %s
  1989. #
  1990. 0    belong    0x31be0000    Microsoft Word Document
  1991. #
  1992. 2080    string    Microsoft\ Excel\ 5.0\ Worksheet    %s
  1993. #
  1994. 0    belong    0x00001a00    Lotus 1-2-3
  1995. >4    belong    0x00100400    wk3 document
  1996. >4    belong    0x02100400    wk4 document
  1997. >4    belong    0x07800100    fm3 or fmb document
  1998. >4    belong    0x07800000    fm3 or fmb document
  1999. #
  2000. 0    belong    0x00000200     Lotus 1-2-3
  2001. >4    belong    0x06040600    wk1 document
  2002. >4    belong    0x06800200    fmt document
  2003.  
  2004. #------------------------------------------------------------------------------
  2005. # ncr:  file(1) magic for NCR Tower objects
  2006. #
  2007. # contributed by
  2008. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  2009. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  2010. #
  2011. 0    beshort        000610    Tower/XP rel 2 object
  2012. >12       belong        >0    not stripped
  2013. >20       beshort        0407    executable
  2014. >20       beshort        0410    pure executable
  2015. >22       beshort        >0    - version %ld
  2016. 0    beshort        000615    Tower/XP rel 2 object
  2017. >12       belong        >0    not stripped
  2018. >20       beshort        0407    executable
  2019. >20       beshort        0410    pure executable
  2020. >22       beshort        >0    - version %ld
  2021. 0    beshort        000620    Tower/XP rel 3 object
  2022. >12       belong        >0    not stripped
  2023. >20       beshort        0407    executable
  2024. >20       beshort        0410    pure executable
  2025. >22       beshort        >0    - version %ld
  2026. 0    beshort        000625    Tower/XP rel 3 object
  2027. >12       belong        >0    not stripped
  2028. >20       beshort        0407    executable
  2029. >20       beshort        0410    pure executable
  2030. >22       beshort        >0    - version %ld
  2031. 0    beshort        000630    Tower32/600/400 68020 object
  2032. >12       belong        >0    not stripped
  2033. >20       beshort        0407    executable
  2034. >20       beshort        0410    pure executable
  2035. >22       beshort        >0    - version %ld
  2036. 0    beshort        000640    Tower32/800 68020
  2037. >18       beshort        &020000    w/68881 object
  2038. >18       beshort        &040000    compatible object
  2039. >18       beshort        &~060000    object
  2040. >20       beshort        0407    executable
  2041. >20       beshort        0413    pure executable
  2042. >12       belong        >0    not stripped
  2043. >22       beshort        >0    - version %ld
  2044. 0    beshort        000645    Tower32/800 68010
  2045. >18       beshort        &040000    compatible object
  2046. >18       beshort        &~060000 object
  2047. >20       beshort        0407    executable
  2048. >20       beshort        0413    pure executable
  2049. >12       belong        >0    not stripped
  2050. >22       beshort        >0    - version %ld
  2051.  
  2052. #------------------------------------------------------------------------------
  2053. # netbsd:  file(1) magic for NetBSD objects
  2054. #
  2055. # All new-style magic numbers are in network byte order.
  2056. #
  2057. 0    lelong            000000413    386BSD demand paged executable
  2058. >16    lelong            >0        not stripped
  2059. 0    lelong            000000314    BSDI demand paged executable
  2060. >16    lelong            >0        not stripped
  2061. >32    byte            0x6a        (uses shared libs)
  2062.  
  2063. 0    lelong&077777777    041400314    FreeBSD/i386 demand paged
  2064. >3    byte            &0x80
  2065. >>20    lelong            <4096        shared library
  2066. >>20    lelong            =4096        dynamically linked executable
  2067. >>20    lelong            >4096        dynamically linked executable
  2068. >3    byte            ^0x80        executable
  2069. >16    lelong            >0        not stripped
  2070.  
  2071. 0    lelong            000000407    NetBSD little-endian object file
  2072. >16    lelong            >0        not stripped
  2073. 0    belong            000000407    NetBSD big-endian object file
  2074. >16    belong            >0        not stripped
  2075.  
  2076. 0    belong&0377777777    041400413    NetBSD/i386 demand paged
  2077. >0    byte            &0x80        
  2078. >>20    lelong            <4096        shared library
  2079. >>20    lelong            =4096        dynamically linked executable
  2080. >>20    lelong            >4096        dynamically linked executable
  2081. >0    byte            ^0x80        executable
  2082. >16    lelong            >0        not stripped
  2083. 0    belong&0377777777    041400410    NetBSD/i386 pure
  2084. >0    byte            &0x80        dynamically linked executable
  2085. >0    byte            ^0x80        executable
  2086. >16    lelong            >0        not stripped
  2087. 0    belong&0377777777    041400407    NetBSD/i386
  2088. >0    byte            &0x80        dynamically linked executable
  2089. >0    byte            ^0x80
  2090. >>0    byte            &0x40        position independent
  2091. >>20    lelong            !0        executable
  2092. >>20    lelong            =0        object file
  2093. >16    lelong            >0        not stripped
  2094. 0    belong&0377777777    041400507    NetBSD/i386 core
  2095. >12    string            >\0        from '%s'
  2096.  
  2097. 0    belong&0377777777    041600413    NetBSD/m68k demand paged
  2098. >0    byte            &0x80        
  2099. >>20    belong            <8192        shared library
  2100. >>20    belong            =8192        dynamically linked executable
  2101. >>20    belong            >8192        dynamically linked executable
  2102. >0    byte            ^0x80        executable
  2103. >16    belong            >0        not stripped
  2104. 0    belong&0377777777    041600410    NetBSD/m68k pure
  2105. >0    byte            &0x80        dynamically linked executable
  2106. >0    byte            ^0x80        executable
  2107. >16    belong            >0        not stripped
  2108. 0    belong&0377777777    041600407    NetBSD/m68k
  2109. >0    byte            &0x80        dynamically linked executable
  2110. >0    byte            ^0x80
  2111. >>0    byte            &0x40        position independent
  2112. >>20    belong            !0        executable
  2113. >>20    belong            =0        object file
  2114. >16    belong            >0        not stripped
  2115. 0    belong&0377777777    041600507    NetBSD/m68k core
  2116. >12    string            >\0        from '%s'
  2117.  
  2118. 0    belong&0377777777    042000413    NetBSD/m68k4k demand paged
  2119. >0    byte            &0x80        
  2120. >>20    belong            <4096        shared library
  2121. >>20    belong            =4096        dynamically linked executable
  2122. >>20    belong            >4096        dynamically linked executable
  2123. >0    byte            ^0x80        executable
  2124. >16    belong            >0        not stripped
  2125. 0    belong&0377777777    042000410    NetBSD/m68k4k pure
  2126. >0    byte            &0x80        dynamically linked executable
  2127. >0    byte            ^0x80        executable
  2128. >16    belong            >0        not stripped
  2129. 0    belong&0377777777    042000407    NetBSD/m68k4k
  2130. >0    byte            &0x80        dynamically linked executable
  2131. >0    byte            ^0x80
  2132. >>0    byte            &0x40        position independent
  2133. >>20    belong            !0        executable
  2134. >>20    belong            =0        object file
  2135. >16    belong            >0        not stripped
  2136. 0    belong&0377777777    042000507    NetBSD/m68k4k core
  2137. >12    string            >\0        from '%s'
  2138.  
  2139. 0    belong&0377777777    042200413    NetBSD/ns32532 demand paged
  2140. >0    byte            &0x80        
  2141. >>20    lelong            <4096        shared library
  2142. >>20    lelong            =4096        dynamically linked executable
  2143. >>20    lelong            >4096        dynamically linked executable
  2144. >0    byte            ^0x80        executable
  2145. >16    lelong            >0        not stripped
  2146. 0    belong&0377777777    042200410    NetBSD/ns32532 pure
  2147. >0    byte            &0x80        dynamically linked executable
  2148. >0    byte            ^0x80        executable
  2149. >16    lelong            >0        not stripped
  2150. 0    belong&0377777777    042200407    NetBSD/ns32532
  2151. >0    byte            &0x80        dynamically linked executable
  2152. >0    byte            ^0x80
  2153. >>0    byte            &0x40        position independent
  2154. >>20    lelong            !0        executable
  2155. >>20    lelong            =0        object file
  2156. >16    lelong            >0        not stripped
  2157. 0    belong&0377777777    042200507    NetBSD/ns32532 core
  2158. >12    string            >\0        from '%s'
  2159.  
  2160. 0    belong&0377777777    042400413    NetBSD/sparc demand paged
  2161. >0    byte            &0x80        
  2162. >>20    belong            <8192        shared library
  2163. >>20    belong            =8192        dynamically linked executable
  2164. >>20    belong            >8192        dynamically linked executable
  2165. >0    byte            ^0x80        executable
  2166. >16    belong            >0        not stripped
  2167. 0    belong&0377777777    042400410    NetBSD/sparc pure
  2168. >0    byte            &0x80        dynamically linked executable
  2169. >0    byte            ^0x80        executable
  2170. >16    belong            >0        not stripped
  2171. 0    belong&0377777777    042400407    NetBSD/sparc
  2172. >0    byte            &0x80        dynamically linked executable
  2173. >0    byte            ^0x80
  2174. >>0    byte            &0x40        position independent
  2175. >>20    belong            !0        executable
  2176. >>20    belong            =0        object file
  2177. >16    belong            >0        not stripped
  2178. 0    belong&0377777777    042400507    NetBSD/sparc core
  2179. >12    string            >\0        from '%s'
  2180.  
  2181. 0    belong&0377777777    042600413    NetBSD/pmax demand paged
  2182. >0    byte            &0x80        
  2183. >>20    lelong            <4096        shared library
  2184. >>20    lelong            =4096        dynamically linked executable
  2185. >>20    lelong            >4096        dynamically linked executable
  2186. >0    byte            ^0x80        executable
  2187. >16    lelong            >0        not stripped
  2188. 0    belong&0377777777    042600410    NetBSD/pmax pure
  2189. >0    byte            &0x80        dynamically linked executable
  2190. >0    byte            ^0x80        executable
  2191. >16    lelong            >0        not stripped
  2192. 0    belong&0377777777    042600407    NetBSD/pmax
  2193. >0    byte            &0x80        dynamically linked executable
  2194. >0    byte            ^0x80
  2195. >>0    byte            &0x40        position independent
  2196. >>20    lelong            !0        executable
  2197. >>20    lelong            =0        object file
  2198. >16    lelong            >0        not stripped
  2199. 0    belong&0377777777    042600507    NetBSD/pmax core
  2200. >12    string            >\0        from '%s'
  2201.  
  2202. 0    belong&0377777777    043000413    NetBSD/vax demand paged
  2203. >0    byte            &0x80        
  2204. >>20    lelong            <4096        shared library
  2205. >>20    lelong            =4096        dynamically linked executable
  2206. >>20    lelong            >4096        dynamically linked executable
  2207. >0    byte            ^0x80        executable
  2208. >16    lelong            >0        not stripped
  2209. 0    belong&0377777777    043000410    NetBSD/vax pure
  2210. >0    byte            &0x80        dynamically linked executable
  2211. >0    byte            ^0x80        executable
  2212. >16    lelong            >0        not stripped
  2213. 0    belong&0377777777    043000407    NetBSD/vax
  2214. >0    byte            &0x80        dynamically linked executable
  2215. >0    byte            ^0x80
  2216. >>0    byte            &0x40        position independent
  2217. >>20    lelong            !0        executable
  2218. >>20    lelong            =0        object file
  2219. >16    lelong            >0        not stripped
  2220. 0    belong&0377777777    043000507    NetBSD/vax core
  2221. >12    string            >\0        from '%s'
  2222.  
  2223. 0    belong&0377777777    043400413    NetBSD/mips demand paged
  2224. >0    byte            &0x80        
  2225. >>20    belong            <8192        shared library
  2226. >>20    belong            =8192        dynamically linked executable
  2227. >>20    belong            >8192        dynamically linked executable
  2228. >0    byte            ^0x80        executable
  2229. >16    belong            >0        not stripped
  2230. 0    belong&0377777777    043400410    NetBSD/mips pure
  2231. >0    byte            &0x80        dynamically linked executable
  2232. >0    byte            ^0x80        executable
  2233. >16    belong            >0        not stripped
  2234. 0    belong&0377777777    043400407    NetBSD/mips
  2235. >0    byte            &0x80        dynamically linked executable
  2236. >0    byte            ^0x80
  2237. >>0    byte            &0x40        position independent
  2238. >>20    belong            !0        executable
  2239. >>20    belong            =0        object file
  2240. >16    belong            >0        not stripped
  2241. 0    belong&0377777777    043400507    NetBSD/mips core
  2242. >12    string            >\0        from '%s'
  2243.  
  2244. #------------------------------------------------------------------------------
  2245. # news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  2246. #
  2247. 0    string        StartFontMetrics    ASCII font metrics
  2248. 0    string        StartFont    ASCII font bits
  2249. 0    belong        0x137A2944    NeWS bitmap font
  2250. 0    belong        0x137A2947    NeWS font family
  2251. 0    belong        0x137A2950    scalable OpenFont binary
  2252. 0    belong        0x137A2951    encrypted scalable OpenFont binary
  2253. 8    belong        0x137A2B45    X11/NeWS bitmap font
  2254. 8    belong        0x137A2B48    X11/NeWS font family
  2255.  
  2256. #------------------------------------------------------------------------------
  2257. # pbm:  file(1) magic for Portable Bitmap files
  2258. #
  2259. # XXX - byte order?
  2260. #
  2261. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  2262. #------------------------------------------------------------------------------
  2263. # pdf:  file(1) magic for Portable Document Format
  2264. #
  2265.  
  2266. 0    string        %PDF-        PDF document
  2267. >5    byte        x        \b, version %c
  2268. >7    byte        x        \b.%c
  2269.  
  2270. #------------------------------------------------------------------------------
  2271. # pdp:  file(1) magic for PDP-11 executable/object and APL workspace
  2272. #
  2273. 0    lelong        0101555        PDP-11 single precision APL workspace
  2274. 0    lelong        0101554        PDP-11 double precision APL workspace
  2275. #
  2276. # PDP-11 a.out
  2277. #
  2278. 0    leshort        0407        PDP-11 executable
  2279. >8    leshort        >0        not stripped
  2280. >15    byte        >0        - version %ld
  2281.  
  2282. 0    leshort        0401        PDP-11 UNIX/RT ldp
  2283. 0    leshort        0405        PDP-11 old overlay
  2284.  
  2285. 0    leshort        0410        PDP-11 pure executable
  2286. >8    leshort        >0        not stripped
  2287. >15    byte        >0        - version %ld
  2288.  
  2289. 0    leshort        0411        PDP-11 separate I&D executable
  2290. >8    leshort        >0        not stripped
  2291. >15    byte        >0        - version %ld
  2292.  
  2293. 0    leshort        0437        PDP-11 kernel overlay
  2294.  
  2295. #------------------------------------------------------------------------------
  2296. # pgp:  file(1) magic for Pretty Good Privacy
  2297. #
  2298. 0       beshort         0x9900                  PGP key public ring
  2299. 0       beshort         0x9501                  PGP key security ring
  2300. 0       beshort         0x9500                  PGP key security ring
  2301. 0    beshort        0xa600            PGP encrypted data
  2302. 0       string          -----BEGIN\040PGP       PGP armored data
  2303. >15     string          PUBLIC\040KEY\040BLOCK- public key block
  2304. >15     string          MESSAGE-                message
  2305. >15     string          SIGNED\040MESSAGE-      signed message
  2306. >15     string          PGP\040SIGNATURE-       signature
  2307.  
  2308. #------------------------------------------------------------------------------
  2309. # pkgadd:  file(1) magic for SysV R4 PKG Datastreams
  2310. #
  2311. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  2312.  
  2313. #------------------------------------------------------------------------------
  2314. # plus5:  file(1) magic for Plus Five's UNIX MUMPS
  2315. #
  2316. # XXX - byte order?  Paging Hokey....
  2317. #
  2318. 0    short        0x259        mumps avl global
  2319. >2    byte        >0        (V%d)
  2320. >6    byte        >0        with %d byte name
  2321. >7    byte        >0        and %d byte data cells
  2322. 0    short        0x25a        mumps blt global
  2323. >2    byte        >0        (V%d)
  2324. >8    short        >0        - %d byte blocks
  2325. >15    byte        0x00        - P/D format
  2326. >15    byte        0x01        - P/K/D format
  2327. >15    byte        0x02        - K/D format
  2328. >15    byte        >0x02        - Bad Flags
  2329.  
  2330. #------------------------------------------------------------------------------
  2331. # printer:  file(1) magic for printer-formatted files
  2332. #
  2333.  
  2334. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2335. 0    string        %!        PostScript document text
  2336. >2    string        PS-Adobe-    conforming
  2337. >>11    string        >\0        at level %.3s
  2338. >>>15    string        EPS        - type %s
  2339. >>>15    string        Query        - type %s
  2340. >>>15    string        ExitServer    - type %s
  2341. # Some PCs have the annoying habit of adding a ^D as a document separator
  2342. 0    string        \004%!        PostScript document text
  2343. >3    string        PS-Adobe-    conforming
  2344. >>12    string        >\0        at level %.3s
  2345. >>>16    string        EPS        - type %s
  2346. >>>16    string        Query        - type %s
  2347. >>>16    string        ExitServer    - type %s
  2348.  
  2349. # HP Printer Job Language
  2350. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  2351. >15    string        \ ENTER\ LANGUAGE\ =
  2352. >31    string        PostScript        Postscript
  2353.  
  2354. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  2355. 0    string        \033E\033    HP PCL printer data
  2356. >3    string        \&l0A        - default page size
  2357. >3    string        \&l1A        - US executive page size
  2358. >3    string        \&l2A        - US letter page size
  2359. >3    string        \&l3A        - US legal page size
  2360. >3    string        \&l26A        - A4 page size
  2361. >3    string        \&l80A        - Monarch envelope size
  2362. >3    string        \&l81A        - No. 10 envelope size
  2363. >3    string        \&l90A        - Intl. DL envelope size
  2364. >3    string        \&l91A        - Intl. C5 envelope size
  2365. >3    string        \&l100A        - Intl. B5 envelope size
  2366. >3    string        \&l-81A        - No. 10 envelope size (landscape)
  2367. >3    string        \&l-90A        - Intl. DL envelope size (landscape)
  2368.  
  2369. # IMAGEN printer-ready files:
  2370. 0    string    @document(        Imagen printer
  2371. # this only works if "language xxx" is first item in Imagen header.
  2372. >10    string    language\ impress    (imPRESS data)
  2373. >10    string    language\ daisy        (daisywheel text)
  2374. >10    string    language\ diablo    (daisywheel text)
  2375. >10    string    language\ printer    (line printer emulation)
  2376. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  2377. # Add any other languages that your Imagen uses - remember
  2378. # to keep the word `text' if the file is human-readable.
  2379. # [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
  2380. #
  2381. # Now magic for IMAGEN font files...
  2382. 0    string        Rast        RST-format raster font data
  2383. >45    string        >0        face %
  2384.  
  2385. #------------------------------------------------------------------------------
  2386. # psdbms:  file(1) magic for psdatabase
  2387. #
  2388. 0    belong&0xff00ffff    0x56000000    ps database
  2389. >1    string    >\0    version %s
  2390. >4    string    >\0    from kernel %s
  2391.  
  2392. #------------------------------------------------------------------------------
  2393. # pyramid:  file(1) magic for Pyramids
  2394. #
  2395. # XXX - byte order?
  2396. #
  2397. 0    long        0x50900107    Pyramid 90x family executable
  2398. 0    long        0x50900108    Pyramid 90x family pure executable
  2399. >16    long        >0        not stripped
  2400. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  2401. >16    long        >0        not stripped
  2402. #------------------------------------------------------------------------------
  2403. #
  2404. # RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt@redhat.com)
  2405. #
  2406. 0    beshort        0xedab        
  2407. >2    beshort        0xeedb        RPM
  2408. >>4    byte        x        v%d
  2409. >>6    beshort        0        bin
  2410. >>6    beshort        1        src
  2411. >>8    beshort        1        i386
  2412. >>8    beshort        2        Alpha
  2413. >>8    beshort        3        Sparc
  2414. >>8    beshort        4        MIPS
  2415. >>8    beshort        5        PowerPC
  2416. >>8    beshort        6        68000
  2417. >>8     beshort         7               SGI
  2418. >>10    string        x        %s
  2419.  
  2420. #------------------------------------------------------------------------------
  2421. # rtf:    file(1) magic for Rich Text Format (RTF)
  2422. #
  2423. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  2424. #
  2425. 0    string        {\\rtf        Rich Text Format data,
  2426. >5    byte        x        version %c,
  2427. >6    string        \\ansi        ANSI
  2428. >6    string        \\mac        Apple Macintosh
  2429. >6    string        \\pc        IBM PC, code page 437
  2430. >6    string        \\pca        IBM PS/2, code page 850
  2431.  
  2432. #------------------------------------------------------------------------------
  2433. # sc:  file(1) magic for "sc" spreadsheet
  2434. #
  2435. 38    string        Spreadsheet    sc spreadsheet file
  2436.  
  2437. #------------------------------------------------------------------------------
  2438. # sccs:  file(1) magic for SCCS archives
  2439. #
  2440. # SCCS archive structure:
  2441. # \001h01207
  2442. # \001s 00276/00000/00000
  2443. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  2444. # \001c date and time created 87/09/23 08:09:20 by ian
  2445. # \001e
  2446. # \001u
  2447. # \001U
  2448. # ... etc.
  2449. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  2450. # *Sigh*. And these both came from various parts of the USG.
  2451. # Maybe we should just switch everybody from SCCS to RCS!
  2452. # Further, you can't just say '\001h0', because the five-digit number
  2453. # is a checksum that could (presumably) have any leading digit,
  2454. # and we don't have regular expression matching yet. 
  2455. # Hence the following official kludge:
  2456. 8    string        \001s\             SCCS archive data
  2457.  
  2458. #------------------------------------------------------------------------------
  2459. # sendmail:  file(1) magic for sendmail config files
  2460. #
  2461. # XXX - byte order?
  2462. #
  2463. 0    byte    046      Sendmail frozen configuration 
  2464. >16    string    >\0      - version %s
  2465. 0    short    0x271c      Sendmail frozen configuration
  2466. >16    string    >\0      - version %s
  2467.  
  2468. #------------------------------------------------------------------------------
  2469. # sequent:  file(1) magic for Sequent machines
  2470. #
  2471. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  2472. # For Sequent's multiprocessor systems (incomplete).
  2473. 0    lelong    0x00ea            BALANCE NS32000 .o
  2474. >16    lelong    >0        not stripped
  2475. >124    lelong    >0        version %ld
  2476. 0    lelong    0x10ea            BALANCE NS32000 executable (0 @ 0)
  2477. >16    lelong  >0                not stripped
  2478. >124    lelong    >0        version %ld
  2479. 0    lelong    0x20ea            BALANCE NS32000 executable (invalid @ 0)
  2480. >16    lelong  >0                not stripped
  2481. >124    lelong    >0        version %ld
  2482. 0    lelong    0x30ea            BALANCE NS32000 standalone executable
  2483. >16    lelong  >0              not stripped
  2484. >124    lelong    >0        version %ld
  2485. #
  2486. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  2487. # Symmetry magic nums will not be reached if DOS COM comes before them;
  2488. # byte 0xeb is matched before these get a chance.
  2489. 0    leshort    0x12eb        SYMMETRY i386 .o
  2490. >16    lelong    >0        not stripped
  2491. >124    lelong    >0        version %ld
  2492. 0    leshort    0x22eb        SYMMETRY i386 executable (0 @ 0)
  2493. >16    lelong    >0        not stripped
  2494. >124    lelong    >0        version %ld
  2495. 0    leshort    0x32eb        SYMMETRY i386 executable (invalid @ 0)
  2496. >16    lelong    >0        not stripped
  2497. >124    lelong    >0        version %ld
  2498. 0    leshort    0x42eb        SYMMETRY i386 standalone executable
  2499. >16    lelong    >0        not stripped
  2500. >124    lelong    >0        version %ld
  2501.  
  2502. #------------------------------------------------------------------------------
  2503. # sgi:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
  2504. #
  2505. # all of SGI's *current* machines and OSes run in big-endian mode on the
  2506. # MIPS machines, as far as I know.
  2507. #
  2508. # XXX - what is the blank "-" line?
  2509. #
  2510. 0    belong    0407        old SGI 68020 executable
  2511. 0    belong    0410        old SGI 68020 pure executable
  2512. 0    beshort    0x8765        disk quotas file
  2513. 0    beshort    0x0506        IRIS Showcase file
  2514. >2    byte    0x49        -
  2515. >3    byte    x        - version %ld
  2516. 0    beshort    0x0226        IRIS Showcase template
  2517. >2    byte    0x63        -
  2518. >3    byte    x        - version %ld
  2519. 0    belong    0x5343464d    IRIS Showcase file
  2520. >4    byte    x        - version %ld
  2521. 0    belong    0x5443464d    IRIS Showcase template
  2522. >4    byte    x        - version %ld
  2523. 0    belong    0xdeadbabe    IRIX Parallel Arena
  2524. >8    belong    >0        - version %ld
  2525. #
  2526. 0    beshort    0x0160        MIPSEB COFF executable
  2527. >20    beshort    0407        (impure)
  2528. >20    beshort    0410        (swapped)
  2529. >20    beshort    0413        (paged)
  2530. >8    belong    >0        not stripped
  2531. >8    belong    0        stripped
  2532. >22    byte    x        - version %ld
  2533. >23    byte    x        .%ld
  2534. #
  2535. 0    beshort    0x0162        MIPSEL COFF executable
  2536. >20    beshort    0407        (impure)
  2537. >20    beshort    0410        (swapped)
  2538. >20    beshort    0413        (paged)
  2539. >8    belong    >0        not stripped
  2540. >8    belong    0        stripped
  2541. >23    byte    x        - version %d
  2542. >22    byte    x        .%ld
  2543. #
  2544. 0    beshort    0x6001        MIPSEB-LE COFF executable
  2545. >20    beshort    03401        (impure)
  2546. >20    beshort    04001        (swapped)
  2547. >20    beshort    05401        (paged)
  2548. >8    belong    >0        not stripped
  2549. >8    belong    0        stripped
  2550. >22    byte    x        - version %d
  2551. >23    byte    x        .%ld
  2552. #
  2553. 0    beshort    0x6201        MIPSEL-LE COFF executable
  2554. >20    beshort    03401        (impure)
  2555. >20    beshort    04001        (swapped)
  2556. >20    beshort    05401        (paged)
  2557. >8    belong    >0        not stripped
  2558. >8    belong    0        stripped
  2559. >22    byte    x        - version %ld
  2560. >23    byte    x        .%ld
  2561. #
  2562. # MIPS 2 additions
  2563. #
  2564. 0    beshort    0x0163        MIPSEB MIPS-II COFF executable
  2565. >20    beshort    0407        (impure)
  2566. >20    beshort    0410        (swapped)
  2567. >20    beshort    0413        (paged)
  2568. >8    belong    >0        not stripped
  2569. >8    belong    0        stripped
  2570. >22    byte    x        - version %ld
  2571. >23    byte    x        .%ld
  2572. #
  2573. 0    beshort    0x0166        MIPSEL MIPS-II COFF executable
  2574. >20    beshort    0407        (impure)
  2575. >20    beshort    0410        (swapped)
  2576. >20    beshort    0413        (paged)
  2577. >8    belong    >0        not stripped
  2578. >8    belong    0        stripped
  2579. >22    byte    x        - version %ld
  2580. >23    byte    x        .%ld
  2581. #
  2582. 0    beshort    0x6301        MIPSEB-LE MIPS-II COFF executable
  2583. >20    beshort    03401        (impure)
  2584. >20    beshort    04001        (swapped)
  2585. >20    beshort    05401        (paged)
  2586. >8    belong    >0        not stripped
  2587. >8    belong    0        stripped
  2588. >23    byte    x        - version %ld
  2589. >23    byte    x        .%ld
  2590. #
  2591. 0    beshort    0x6601        MIPSEL-LE MIPS-II COFF executable
  2592. >20    beshort    03401        (impure)
  2593. >20    beshort    04001        (swapped)
  2594. >20    beshort    05401        (paged)
  2595. >8    belong    >0        not stripped
  2596. >8    belong    0        stripped
  2597. >23    byte    x        - version %ld
  2598. >23    byte    x        .%ld
  2599. #
  2600. # MIPS 3 additions
  2601. #
  2602. 0    beshort    0x0140        MIPSEB MIPS-III COFF executable
  2603. >20    beshort    0407        (impure)
  2604. >20    beshort    0410        (swapped)
  2605. >20    beshort    0413        (paged)
  2606. >8    belong    >0        not stripped
  2607. >8    belong    0        stripped
  2608. >22    byte    x        - version %ld
  2609. >23    byte    x        .%ld
  2610. #
  2611. 0    beshort    0x0142        MIPSEL MIPS-III COFF executable
  2612. >20    beshort    0407        (impure)
  2613. >20    beshort    0410        (swapped)
  2614. >20    beshort    0413        (paged)
  2615. >8    belong    >0        not stripped
  2616. >8    belong    0        stripped
  2617. >22    byte    x        - version %ld
  2618. >23    byte    x        .%ld
  2619. #
  2620. 0    beshort    0x4001        MIPSEB-LE MIPS-III COFF executable
  2621. >20    beshort    03401        (impure)
  2622. >20    beshort    04001        (swapped)
  2623. >20    beshort    05401        (paged)
  2624. >8    belong    >0        not stripped
  2625. >8    belong    0        stripped
  2626. >23    byte    x        - version %ld
  2627. >23    byte    x        .%ld
  2628. #
  2629. 0    beshort    0x4201        MIPSEL-LE MIPS-III COFF executable
  2630. >20    beshort    03401        (impure)
  2631. >20    beshort    04001        (swapped)
  2632. >20    beshort    05401        (paged)
  2633. >8    belong    >0        not stripped
  2634. >8    belong    0        stripped
  2635. >23    byte    x        - version %ld
  2636. >23    byte    x        .%ld
  2637. #
  2638. 0    beshort    0x180        MIPSEB Ucode
  2639. 0    beshort    0x182        MIPSEL Ucode
  2640. # 32bit core file
  2641. 0    belong    0xdeadadb0    IRIX core dump
  2642. >4    belong    1        of
  2643. >16    string    >\0        '%s'
  2644. # 64bit core file
  2645. 0    belong    0xdeadad40    IRIX 64-bit core dump
  2646. >4    belong    1        of
  2647. >16    string    >\0        '%s'
  2648. # New style crash dump file
  2649. 0    string    \x43\x72\x73\x68\x44\x75\x6d\x70    IRIX vmcore dump of
  2650. >36    string    >\0                    '%s'
  2651. # Trusted IRIX info
  2652. 0    string    SGIAUDIT    SGI Audit file
  2653. >8    byte    x        - version %d
  2654. >9    byte    x        .%ld
  2655. # Are these three SGI-based file types or general ones?
  2656. 0    string    WNGZWZSC    Wingz compiled script
  2657. 0    string    WNGZWZSS    Wingz spreadsheet
  2658. 0    string    WNGZWZHP    Wingz help file
  2659. #
  2660. 0    string    \#Inventor V    IRIS Inventor file
  2661. # XXX - I don't know what next thing is!  It is likely to be an image
  2662. # (or movie) format
  2663. 0    string    glfHeadMagic();        GLF_TEXT
  2664. 4    belong    0x41010000        GLF_BINARY_LSB_FIRST
  2665. 4    belong    0x00000141        GLF_BINARY_MSB_FIRST
  2666.  
  2667. #------------------------------------------------------------------------------
  2668. # sgml:  file(1) magic for Standard Generalized Markup Language
  2669.  
  2670. # HyperText Markup Language (HTML) is an SGML document type,
  2671. # from Daniel Quinlan (quinlan@yggdrasil.com)
  2672. 0    string        \<!DOCTYPE\ HTML    HTML document text
  2673. 0    string        \<!doctype\ html    HTML document text
  2674. 0    string        \<HEAD        HTML document text
  2675. 0    string        \<head        HTML document text
  2676. 0    string        \<TITLE        HTML document text
  2677. 0    string        \<title        HTML document text
  2678. 0    string        \<html        HTML document text
  2679. 0    string        \<HTML        HTML document text
  2680.  
  2681. # SGML, mostly from rph@sq
  2682. 0    string        \<!DOCTYPE    exported SGML document text
  2683. 0    string        \<!doctype    exported SGML document text
  2684. 0    string        \<!SUBDOC    exported SGML subdocument text
  2685. 0    string        \<!subdoc    exported SGML subdocument text
  2686. 0    string        \<!--        exported SGML document text
  2687.  
  2688. #------------------------------------------------------------------------------
  2689. # softquad:  file(1) magic for SoftQuad Publishing Software
  2690. #
  2691. # $Id: softquad,v 1.9 1995/01/21 21:09:00 christos Exp $
  2692. # Author/Editor and RulesBuilder
  2693. #
  2694. # XXX - byte order?
  2695. #
  2696. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  2697. >9    string        >\0         Type %s
  2698. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  2699. >9    string        >\0         Type %s
  2700. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  2701. >9    string        >\0         Type %s
  2702. 0    short        0xc0de        Compiled PSI (v1) data
  2703. 0    short        0xc0da        Compiled PSI (v2) data
  2704. >3    string        >\0        (%s)
  2705. # Binary sqtroff font/desc files...
  2706. 0    short        0125252        SoftQuad DESC or font file binary
  2707. >2    short        >0        - version %d
  2708. # Bitmaps...
  2709. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  2710. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  2711. # sqtroff intermediate language (replacement for ditroff int. lang.)
  2712. 0    string        X\         SoftQuad troff Context intermediate
  2713. >2    string        495        for AT&T 495 laser printer
  2714. >2    string        hp        for Hewlett-Packard LaserJet
  2715. >2    string        impr        for IMAGEN imPRESS
  2716. >2    string        ps        for PostScript
  2717.  
  2718. #------------------------------------------------------------------------------
  2719. # sun:  file(1) magic for Sun machines
  2720. #
  2721. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  2722. # releases.  (5.x uses ELF.)
  2723. #
  2724. 0    belong&077777777    0600413        sparc demand paged
  2725. >0    byte        &0x80
  2726. >>20    belong        <4096        shared library
  2727. >>20    belong        =4096        dynamically linked executable
  2728. >>20    belong        >4096        dynamically linked executable
  2729. >0    byte        ^0x80        executable
  2730. >16    belong        >0        not stripped
  2731. 0    belong&077777777    0600410        sparc pure
  2732. >0    byte        &0x80        dynamically linked executable
  2733. >0    byte        ^0x80        executable
  2734. >16    belong        >0        not stripped
  2735. 0    belong&077777777    0600407        sparc
  2736. >0    byte        &0x80        dynamically linked executable
  2737. >0    byte        ^0x80        executable
  2738. >16    belong        >0        not stripped
  2739.  
  2740. 0    belong&077777777    0400413        mc68020 demand paged
  2741. >0    byte        &0x80
  2742. >>20    belong        <4096        shared library
  2743. >>20    belong        =4096        dynamically linked executable
  2744. >>20    belong        >4096        dynamically linked executable
  2745. >16    belong        >0        not stripped
  2746. 0    belong&077777777    0400410        mc68020 pure
  2747. >0    byte        &0x80        dynamically linked executable
  2748. >0    byte        ^0x80        executable
  2749. >16    belong        >0        not stripped
  2750. 0    belong&077777777    0400407        mc68020
  2751. >0    byte        &0x80        dynamically linked executable
  2752. >0    byte        ^0x80        executable
  2753. >16    belong        >0        not stripped
  2754.  
  2755. 0    belong&077777777    0200413        mc68010 demand paged
  2756. >0    byte        &0x80
  2757. >>20    belong        <4096        shared library
  2758. >>20    belong        =4096        dynamically linked executable
  2759. >>20    belong        >4096        dynamically linked executable
  2760. >16    belong        >0        not stripped
  2761. 0    belong&077777777    0200410        mc68010 pure
  2762. >0    byte        &0x80        dynamically linked executable
  2763. >0    byte        ^0x80        executable
  2764. >16    belong        >0        not stripped
  2765. 0    belong&077777777    0200407        mc68010
  2766. >0    byte        &0x80        dynamically linked executable
  2767. >0    byte        ^0x80        executable
  2768. >16    belong        >0        not stripped
  2769.  
  2770. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  2771. 0    belong        0407        old sun-2 executable
  2772. >16    belong        >0        not stripped
  2773. 0    belong        0410        old sun-2 pure executable
  2774. >16    belong        >0        not stripped
  2775. 0    belong        0413        old sun-2 demand paged executable
  2776. >16    belong        >0        not stripped
  2777.  
  2778. #
  2779. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  2780. # binary executed in compatibility mode under SunOS 5.x".
  2781. #
  2782. 0    belong        0x080456    SunOS core file
  2783. >4    belong        432        (SPARC)
  2784. >>132    string        >\0        from '%s'
  2785. >>116    belong        =3        (quit)
  2786. >>116    belong        =4        (illegal instruction)
  2787. >>116    belong        =5        (trace trap)
  2788. >>116    belong        =6        (abort)
  2789. >>116    belong        =7        (emulator trap)
  2790. >>116    belong        =8        (arithmetic exception)
  2791. >>116    belong        =9        (kill)
  2792. >>116    belong        =10        (bus error)
  2793. >>116    belong        =11        (segmentation violation)
  2794. >>116    belong        =12        (bad argument to system call)
  2795. >>116    belong        =29        (resource lost)
  2796. >>120    belong        x        (T=%dK,
  2797. >>124    belong        x        D=%dK,
  2798. >>128    belong        x        S=%dK)
  2799. >4    belong        826        (68K)
  2800. >>128    string        >\0        from '%s'
  2801. >4    belong        456        (SPARC 4.x BCP)
  2802. >>152    string        >\0        from '%s'
  2803.  
  2804. #------------------------------------------------------------------------------
  2805. # terminfo:  file(1) magic for terminfo
  2806. #
  2807. # XXX - byte order for screen images?
  2808. #
  2809. 0    string        \032\001    Compiled terminfo entry
  2810. 0    short        0433        Curses screen image
  2811. 0    short        0434        Curses screen image
  2812.  
  2813. #------------------------------------------------------------------------------
  2814. # tex:  file(1) magic for TeX files
  2815. #
  2816. # From <conklin@talisman.kaleida.com>
  2817.  
  2818. # Although we may know the offset of certain text fields in TeX DVI
  2819. # and font files, we can't use them reliably because they are not
  2820. # zero terminated. [but we do anyway, christos]
  2821. 0    string        \367\002    TeX DVI file
  2822. >16    string        >\0        (%s)
  2823. 0    string        \367\203    TeX generic font data
  2824. 0    string        \367\131    TeX packed font data
  2825. >3    string        >\0        (%s)
  2826. 0    string        \367\312    TeX virtual font data
  2827. 0    string        This\ is\ TeX,    TeX transcript text
  2828. 0    string        This\ is\ METAFONT,    METAFONT transcript text
  2829.  
  2830. # There is no way to detect TeX Font Metric (*.tfm) files without
  2831. # breaking them apart and reading the data.  The following patterns
  2832. # match most *.tfm files generated by METAFONT or afm2tfm.
  2833. 2    string        \000\021    TeX font metric data
  2834. >33    string        >\0        (%s)
  2835. 2    string        \000\022    TeX font metric data
  2836. >33    string        >\0        (%s)
  2837.  
  2838. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  2839. 0    string        \\input\ texinfo    Texinfo source text
  2840. 0    string        This\ is\ Info\ file    GNU Info text
  2841.  
  2842. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  2843. 0    string        \\input        TeX document text
  2844. 0    string        \\section    LaTeX document text
  2845. 0    string        \\setlength    LaTeX document text
  2846. 0    string        \\documentstyle    LaTeX document text
  2847. 0    string        \\chapter    LaTeX document text
  2848.  
  2849. #------------------------------------------------------------------------------
  2850. # timezone:  file(1) magic for timezone data
  2851. #
  2852. # from Daniel Quinlan (quinlan@yggdrasil.com)
  2853. # this should work on Linux, SunOS, and maybe others
  2854. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0    timezone data
  2855. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0    timezone data
  2856. 0    string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0    timezone data
  2857. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0    timezone data
  2858. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0    timezone data
  2859. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0    timezone data
  2860.  
  2861. #------------------------------------------------------------------------------
  2862. # troff:  file(1) magic for *roff
  2863. #
  2864. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2865.  
  2866. # troff input
  2867. 0    string        .\\"        troff or preprocessor input text
  2868. 0    string        '\\"        troff or preprocessor input text
  2869. 0    string        '.\\"        troff or preprocessor input text
  2870. 0    string        \\"        troff or preprocessor input text
  2871.  
  2872. # ditroff intermediate output text
  2873. 0    string        x\ T        ditroff text
  2874. >4    string        cat        for the C/A/T phototypesetter
  2875. >4    string        ps        for PostScript
  2876. >4    string        dvi        for DVI
  2877. >4    string        ascii        for ASCII
  2878. >4    string        lj4        for LaserJet 4
  2879. >4    string        latin1        for ISO 8859-1 (Latin 1)
  2880. >4    string        X75        for xditview at 75dpi
  2881. >>7    string        -12        (12pt)
  2882. >4    string        X100        for xditview at 100dpi
  2883. >>8    string        -12        (12pt)
  2884.  
  2885. # output data formats
  2886. 0    string        \100\357    very old (C/A/T) troff output data
  2887.  
  2888. #------------------------------------------------------------------------------
  2889. # typeset:  file(1) magic for other typesetting
  2890. #
  2891. 0    string        Interpress/Xerox    Xerox InterPress data
  2892. >16    string        /            (version
  2893. >>17    string        >\0            %s)
  2894.  
  2895. #------------------------------------------------------------------------------
  2896. # unknown:  file(1) magic for unknown machines
  2897. #
  2898. # XXX - this probably should be pruned, as it'll match PDP-11 and
  2899. # VAX image formats.
  2900. #
  2901. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  2902. # respectively).
  2903. #
  2904. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  2905. # have the "version %ld", which may be a bogus COFFism (I don't think
  2906. # there ever was COFF for the PDP-11).
  2907. #
  2908. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  2909. # long, as it would be on a VAX.
  2910. #
  2911. # 0x10C is 0414, 0x10D is 0415, and 0x10E is 416; those *are* unknown.
  2912. #
  2913. 0    short        0x107        unknown machine executable
  2914. >8    short        >0        not stripped
  2915. >15    byte        >0        - version %ld
  2916. 0    short        0x108        unknown pure executable
  2917. >8    short        >0        not stripped
  2918. >15    byte        >0        - version %ld
  2919. 0    short        0x109        PDP-11 separate I&D
  2920. >8    short        >0        not stripped
  2921. >15    byte        >0        - version %ld
  2922. 0    short        0x10b        unknown pure executable
  2923. >8    short        >0        not stripped
  2924. >15    byte        >0        - version %ld
  2925. 0    long        0x10c        unknown demand paged pure executable
  2926. >16    long        >0        not stripped
  2927. 0    long        0x10d        unknown demand paged pure executable
  2928. >16    long        >0        not stripped
  2929. 0    long        0x10e        unknown readable demand paged pure executable
  2930.  
  2931. #------------------------------------------------------------------------------
  2932. # uuencode:  file(1) magic for ASCII-encoded files
  2933. #
  2934.  
  2935. # GRR:  the first line of xxencoded files is identical to that in uuencoded
  2936. # files, but the first character in most subsequent lines is 'h' instead of
  2937. # 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
  2938. # punctuation and survives BITNET gateways better.)  If regular expressions
  2939. # were supported, this entry could possibly be split into two with
  2940. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  2941. 0    string        begin\040    uuencoded or xxencoded text
  2942.  
  2943. # btoa(1) is an alternative to uuencode that requires less space.
  2944. 0    string        xbtoa\ Begin    btoa'd text
  2945.  
  2946. # ship(1) is another, much cooler alternative to uuencode.
  2947. # Greg Roelofs, newt@uchicago.edu
  2948. 0    string        $\012ship    ship'd binary text
  2949.  
  2950. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  2951. # Greg Roelofs, newt@uchicago.edu
  2952. 0    string    Decode\ the\ following\ with\ bdeco    bencoded News text
  2953.  
  2954. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  2955. # Daniel Quinlan, quinlan@yggdrasil.com
  2956. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  2957. >41    string    x                    \b, version %.3s
  2958.  
  2959. # GRR:  is MIME BASE64 encoding handled somewhere?
  2960.  
  2961. #------------------------------------------------------------------------------
  2962. # varied.out:  file(1) magic for various USG systems
  2963. #
  2964. #    Herewith many of the object file formats used by USG systems.
  2965. #    Most have been moved to files for a particular processor,
  2966. #    and deleted if they duplicate other entries.
  2967. #
  2968. 0    short        0610        Perkin-Elmer executable
  2969. # AMD 29K
  2970. 0    beshort        0572        amd 29k coff noprebar executable
  2971. 0    beshort        01572        amd 29k coff prebar executable
  2972. 0    beshort        0160007        amd 29k coff archive
  2973. # Cray
  2974. 6    beshort        0407        unicos (cray) executable
  2975.  
  2976. #------------------------------------------------------------------------------
  2977. # vax:  file(1) magic for VAX executable/object and APL workspace
  2978. #
  2979. 0    lelong        0101557        VAX single precision APL workspace
  2980. 0    lelong        0101556        VAX double precision APL workspace
  2981.  
  2982. #
  2983. # VAX a.out (32V, BSD)
  2984. #
  2985. 0    lelong        0407        VAX executable
  2986. >16    lelong        >0        not stripped
  2987.  
  2988. 0    lelong        0410        VAX pure executable
  2989. >16    lelong        >0        not stripped
  2990.  
  2991. 0    lelong        0413        VAX demand paged pure executable
  2992. >16    lelong        >0        not stripped
  2993.  
  2994. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  2995. >16    lelong        >0        not stripped
  2996.  
  2997. #
  2998. # VAX COFF
  2999. #
  3000. # The `versions' should be un-commented if they work for you.
  3001. # (Was the problem just one of endianness?)
  3002. #
  3003. 0    leshort        0570        VAX COFF executable
  3004. >12    lelong        >0        not stripped
  3005. >22    leshort        >0        - version %ld
  3006. 0    leshort        0575        VAX COFF pure executable
  3007. >12    lelong        >0        not stripped
  3008. >22    leshort        >0        - version %ld
  3009.  
  3010. #------------------------------------------------------------------------------
  3011. # visx:  file(1) magic for Visx format files
  3012. #
  3013. 0    short        0x5555        VISX image file
  3014. >2    byte        0        (zero)
  3015. >2    byte        1        (unsigned char)
  3016. >2    byte        2        (short integer)
  3017. >2    byte        3        (float 32)
  3018. >2    byte        4        (float 64)
  3019. >2    byte        5        (signed char)
  3020. >2    byte        6        (bit-plane)
  3021. >2    byte        7        (classes)
  3022. >2    byte        8        (statistics)
  3023. >2    byte        10        (ascii text)
  3024. >2    byte        15        (image segments)
  3025. >2    byte        100        (image set)
  3026. >2    byte        101        (unsigned char vector)
  3027. >2    byte        102        (short integer vector)
  3028. >2    byte        103        (float 32 vector)
  3029. >2    byte        104        (float 64 vector)
  3030. >2    byte        105        (signed char vector)
  3031. >2    byte        106        (bit plane vector)
  3032. >2    byte        121        (feature vector)
  3033. >2    byte        122        (feature vector library)
  3034. >2    byte        124        (chain code)
  3035. >2    byte        126        (bit vector)
  3036. >2    byte        130        (graph)
  3037. >2    byte        131        (adjacency graph)
  3038. >2    byte        132        (adjacency graph library)
  3039. >2    string        .VISIX        (ascii text)
  3040.  
  3041. #------------------------------------------------------------------------------
  3042. # vms:  file(1) magic for VMS executables (experimental)
  3043. #
  3044. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  3045.  
  3046. # GRR 950122:  I'm just guessing on these, based on inspection of the headers
  3047. # of three executables each for Alpha and VAX architectures.  The VAX files
  3048. # all had headers similar to this:
  3049. #
  3050. #   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
  3051. #   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
  3052. #
  3053. 0    string    \xb0\0\x30\0    VMS VAX executable
  3054. >44032    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  3055. #
  3056. # The AXP files all looked like this, except that the byte at offset 0x22
  3057. # was 06 in some of them and 07 in others:
  3058. #
  3059. #   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
  3060. #   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
  3061. #   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  3062. #   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
  3063. #   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
  3064. #
  3065. 0    belong    0x03000000    VMS Alpha executable
  3066. >75264    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  3067.  
  3068. #------------------------------------------------------------------------------
  3069. # zilog:  file(1) magic for Zilog Z8000.
  3070. #
  3071. # Was it big-endian or little-endian?  My Product Specification doesn't
  3072. # say.
  3073. #
  3074. 0    long        0xe807        object file (z8000 a.out)
  3075. 0    long        0xe808        pure object file (z8000 a.out)
  3076. 0    long        0xe809        separate object file (z8000 a.out)
  3077. 0    long        0xe805        overlay object file (z8000 a.out)
  3078.  
  3079. #------------------------------------------------------------------------------
  3080. # zyxel:  file(1) magic for ZyXEL modems
  3081. #
  3082. # From <rob@pe1chl.ampr.org>
  3083. # These are the /etc/magic entries to decode datafiles as used for the
  3084. # ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
  3085. # ZyXEL-defined standard)
  3086.  
  3087. 0    string        ZyXEL\002    ZyXEL voice data
  3088. >10    byte        0        - CELP encoding
  3089. >10    byte&0x0B    1        - ADPCM2 encoding
  3090. >10    byte&0x0B    2        - ADPCM3 encoding
  3091. >10    byte&0x0B    3        - ADPCM4 encoding
  3092. >10    byte&0x0B    8        - New ADPCM3 encoding
  3093. >10    byte&0x04    4        with resync
  3094.